﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Asol.Reporting.Support;
using Asol.Reporting.Support.Parser;
using System.Drawing;
using Asol.Reporting.Editor.Components;

namespace Asol.Reporting.Editor.Data
{
    /// <summary>
    /// Třída, která zajišťuje konverzi z formátu Powerbuilder
    /// </summary>
    internal class Pb7Loader : IDisposable
    {
        #region Načítání obsahu reportu z formátu PowerBuilder.SRD
        /// <summary>
        /// Načte a vrátí data z dodaného stringu, data jsou parsovaná na jednotlivé prvky dle formátu SRD.
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        internal static List<ParserSegment> GetReportSrdDataFromContent(string content)
        {
            if (content == null) return null;

            List<ParserSegment> srdList = Parser.ParseString(content, CreateParserSettingSrd());
            return srdList;
        }
        /// <summary>
        /// Načte a vrátí data ze souboru daného jména, data jsou parsovaná na jednotlivé prvky dle formátu SRD.
        /// Soubor hledá a načítá metodou GetReportSrd(): Hledá nejbližší adresář Reports, a v něm (i v jeho podadresářích) hledá soubor daného jména.
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        internal static List<ParserSegment> GetReportSrdDataFromFile(string name)
        {
            string content = GetReportContent(name);
            return GetReportSrdDataFromContent(content);
        }
        /// <summary>
        /// Načte a vrátí obsah souboru daného jména z adresáře Reports (adresář hledá kdekoliv na cestě od aplikace nahoru)
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        internal static string GetReportContent(string name)
        {
            string fullName = ReportDocument.FindReportFile(name);
            if (fullName == null) return null;
            return System.IO.File.ReadAllText(fullName, Encoding.Default);
        }
        #endregion
        #region Tvorba Settingu pro parsování formátu SRD
        /// <summary>
        /// Vytvoří a vrátí ParserSetting, který popisuje formát SRD.
        /// S tímto settingem může následně obecný parser (class: Asol.Reporting.Support.Parser.Parser) rozdělit text souboru SRD na jednotlivé významové segmenty.
        /// </summary>
        /// <returns></returns>
        internal static ParserSetting CreateParserSettingSrd()
        {
            ParserSetting setting = new ParserSetting("Pb7FormatSrd", SETTING_SEGM_TEXT);

            ParserSegmentSetting segment;

            // Text
            segment = new ParserSegmentSetting(SETTING_SEGM_TEXT);
            segment.Blanks = new string[] { " ", "\t" };                // Oddělují jednotlivá slova v rámci stejného segmentu, například:  KOČKA PES BOUDA   jsou tři prvky (ParserSegment) oddělená oddělovačem (Blank)
            segment.Delimiters = new string[] { ",", "+", "-", "*", "/", "<", "=", ">", "<=", ">=", "<>", "%" };
            segment.EndWith = new string[] { "\r\n", "\r", "\n" };      // Ukončí segment a začne nový. Takto zadaná množina řeší i různé styly zadání konce řádku.
            segment.SpecialTexts = new ParserSegmentSpecialTexts[] { new ParserSegmentSpecialTexts("~\"", "\"") };              // Řetězec   ~"  chápeme jako znak  "   a nikoli jako začátek stringu
            segment.InnerSegmentsNames = new string[] { SETTING_SEGM_PAR, SETTING_SEGM_STRING };
            setting.SegmentSettingAdd(segment);

            // Závorka
            segment = new ParserSegmentSetting(SETTING_SEGM_PAR, segment);
            segment.Blanks = new string[] { " ", "\t", "\r\n", "\r", "\n" };    // Oddělují jednotlivá slova v rámci stejného segmentu, například:  KOČKA PES BOUDA   jsou tři prvky (ParserSegment) oddělená oddělovačem (Blank)
            segment.BeginWith = "(";
            segment.EndWith = new string[] { ")" };
            segment.InnerSegmentsNames = new string[] { SETTING_SEGM_TEXT, SETTING_SEGM_PAR, SETTING_SEGM_STRING };
            setting.SegmentSettingAdd(segment);

            // String
            segment = new ParserSegmentSetting(SETTING_SEGM_STRING);
            segment.BeginWith = "\"";
            segment.EndWith = new string[] { "\"" };
            segment.Blanks = new string[] { "~t" };                     // Oddělují jednotlivé texty ve stringu (typicky:  format="[general]~tif(  alt_used_here > 0 , ~"ANO~", ~"! NE !~" )"    )
            segment.SpecialTexts = new ParserSegmentSpecialTexts[] { new ParserSegmentSpecialTexts("~\"", "\"") };              // Řetězec   ~"  chápeme jako znak  "   a nikoli jako konec stringu
            setting.SegmentSettingAdd(segment);

            return setting;
        }
        private const string SETTING_SEGM_TEXT = "SegmText";
        private const string SETTING_SEGM_PAR = "SegmPar";
        private const string SETTING_SEGM_STRING = "SegmString";
        #endregion
        #region Naplnění dokumentu ReportDocument daty ze sestavy SRD
        /// <summary>
        /// Převezme data reportu (SRD) a vloží je do report dokumentu
        /// </summary>
        /// <param name="srdSegments">Parsované segmenty PB7 reportu (SRD formát)</param>
        /// <param name="document">Report Dokument, do něhož se data vkládají</param>
        /// <param name="fileName">Soubor, z něhož se data načítají</param>
        public static void ConvertSrdToDocument(List<Asol.Reporting.Support.Parser.ParserSegment> srdSegments, ReportDocument document, string fileName)
        {
            string currentContent = document.DocumentGetXmlContent();
            try
            {
                document.ClearAll(DocumentNewPresetMode.OnlyRootBand);
                using (Pb7Loader loader = new Pb7Loader(document))
                {
                    loader.ConvertSrdSegments(srdSegments);
                }
                document.DocumentFile = System.IO.Path.ChangeExtension(fileName, "xml");
            }
            catch (Exception)
            {
                try { document.DocumentSetXmlContent(currentContent); }
                catch { }
                throw;
            }
        }
        #region Privátní instance
        /// <summary>
        /// Konstruktor je privátní
        /// </summary>
        private Pb7Loader(ReportDocument document)
        {
            this.Document = document;
            this.BandSrdList = new List<BandSrd>();
            this.BandNameIds = null;
            this.Release = SrdRelease.None;
            this.Units = Pb7Units.Native;
        }
        void IDisposable.Dispose()
        {
            this.Document = null;
            this.BandNameIds = null;
        }
        /// <summary>
        /// Dokument, který se plní
        /// </summary>
        private ReportDocument Document;
        /// <summary>
        /// Verze PowerBuilderu, v níž byl report uložen
        /// </summary>
        private SrdRelease Release;
        /// <summary>
        /// Jednotky měr v sestavě.
        /// Setování provede aktualizaci UnitCoefficient.
        /// </summary>
        private Pb7Units Units
        {
            get { return this._Units; }
            set
            {
                this._Units = value;
                this.UnitCoefficient = ((float)((int)Pb7Units.Centimeter)) / ((float)((int)value));
            }
        }
        private Pb7Units _Units;
        /// <summary>
        /// Přepočtový koeficient z jednotek SRD na milimetry:
        /// počet [milimetry] = počet z SRD * UnitCoefficient / 100f
        /// </summary>
        private float UnitCoefficient;
        private enum SrdRelease { None, Release4, Release7 }
        /// <summary>
        /// Jednotky měr v sestavě SRD
        /// </summary>
        private enum Pb7Units : int
        {
            // Zde uváděné hodnoty enumu jsou hodnotami, které PB7 ukládá jako hodnoty pro shodný rozměr při použití různých jednotek:
            /// <summary>
            /// Nativní builder, 100 mm = 1516
            /// </summary>
            Native = 4480,
            /// <summary>
            /// Pixely, 100 mm = 379
            /// </summary>
            Pixel = 980,
            /// <summary>
            /// Inches, 100 mm = 3947
            /// </summary>
            Inch = 10208,
            /// <summary>
            /// Centimetry, 100 mm = 10027
            /// </summary>
            Centimeter = 25929
        }
        #endregion
        #region Základní metody importu (začátek, kontroly, iterace jednotlivých položek)
        /// <summary>
        /// Fyzická konverze SRD segmentů do ReportDocumentu.
        /// Segmenty jsou vytvářeny po řádcích dokumentu.
        /// Jejich obsah je dělen 
        /// </summary>
        /// <param name="srdSegments"></param>
        private void ConvertSrdSegments(List<ParserSegment> srdSegments)
        {
            int count = srdSegments.Count;
            this.ConvertSrdCheckRowCount(count);
            this.ConvertSrdCheckHeader(srdSegments[0]);
            int begin = this.ConvertSrdCheckRelease(srdSegments);
            for (int s = begin + 1; s < count; s++)
                this.ConvertSrdSegment(srdSegments[s]);
            this.CheckBandSrdProcessed();
        }
        /// <summary>
        /// Kontrola počtu řádků
        /// </summary>
        /// <param name="count"></param>
        private void ConvertSrdCheckRowCount(int count)
        {
            if (count > 5) return;
            throw new UserException("Format of SRD file is invalid: row count is too small (" + count.ToString() + ").");
        }
        /// <summary>
        /// Kontrola řádku 0 (záhlaví)
        /// </summary>
        /// <param name="segment"></param>
        private void ConvertSrdCheckHeader(ParserSegment segment)
        {
            string text = segment.Text;
            if (text.StartsWith(SRD_HEADER)) return;
            throw new UserException("Format of SRD file is invalid: Line 1 does not match expected content. Line=" + text + "; expected=" + SRD_HEADER + ".");
        }
        /// <summary>
        /// Kontrola řádku 1 (release)
        /// </summary>
        /// <param name="segments"></param>
        private int ConvertSrdCheckRelease(List<ParserSegment> segments)
        {
            this.Release = SrdRelease.None;
            for (int s = 1; s < segments.Count; s++)
            {
                ParserSegment segment = segments[s];
                string text = segment.Text;
                if (text.StartsWith(SRD_RELEASE1))
                    this.Release = SrdRelease.Release4;
                else if (text.StartsWith(SRD_RELEASE2))
                    this.Release = SrdRelease.Release4;
                else if (text.StartsWith(SRD_RELEASE3))
                    this.Release = SrdRelease.Release4;
                else if (text.StartsWith(SRD_RELEASE4))
                    this.Release = SrdRelease.Release4;
                else if (text.StartsWith(SRD_RELEASE5))
                    this.Release = SrdRelease.Release4;
                else if (text.StartsWith(SRD_RELEASE6))
                    this.Release = SrdRelease.Release4;
                else if (text.StartsWith(SRD_RELEASE7))
                    this.Release = SrdRelease.Release7;

                if (this.Release != SrdRelease.None)
                    return s;
            }
            throw new UserException("Format of SRD file is invalid: file does not contain Pb7Release expression. (expected=" + SRD_HEADER + ").");
        }
        #endregion
        #region Detekce jednotlivých položek, plnění specifických dat
        /// <summary>
        /// Zpracování dalších segmentů - detekce názvu a rozdělení do odpovídající metody
        /// </summary>
        /// <param name="segment"></param>
        private void ConvertSrdSegment(ParserSegment segment)
        {
            if (segment.ValueList.Count != 2) return;
            string name = segment.ValueList[0].Text;
            KeyValueSegmentList values = ConvertSrdSplitValues(segment.ValueList[1]);
            switch (name)
            {
                case SRD_DATAWINDOW:
                    this.ConvertSrdSegmentDataWindow(name, values);
                    break;
                case SRD_BAND_HEADER:
                case SRD_BAND_DETAIL:
                case SRD_BAND_SUMMARY:
                case SRD_BAND_FOOTER:
                    this.ConvertSrdSegmentBand(name, values);
                    break;
                case SRD_DATA_TABLE:
                    this.ConvertSrdSegmentTable(name, values);
                    break;
                case SRD_GROUP:
                    this.ConvertSrdSegmentGroup(name, values);
                    break;
                case SRD_OBJECT_TEXT:
                    this.CheckBandSrdProcessed();
                    this.ConvertSrdSegmentText(name, values);
                    break;
                case SRD_OBJECT_COLUMN:
                    this.CheckBandSrdProcessed();
                    this.ConvertSrdSegmentColumn(name, values);
                    break;
                case SRD_OBJECT_COMPUTE:
                    this.CheckBandSrdProcessed();
                    this.ConvertSrdSegmentCompute(name, values);
                    break;
                case SRD_OBJECT_LINE:
                    break;
                case SRD_OBJECT_RECTANGLE:
                    this.CheckBandSrdProcessed();
                    this.ConvertSrdSegmentRectangle(name, values);
                    break;
                case SRD_OBJECT_REPORT:
                    this.CheckBandSrdProcessed();
                    this.ConvertSrdSegmentNested(name, values);
                    break;

                // report(band=detail dataobject="dw_nested_fa_vydana_splatky" x="18" y="0" height="72" width="3323" border="0"  height.autosize=yes criteria="" nest_arguments=((" cislo_subjektu ")) trail_footer = yes  name=dw_1  slideup=directlyabove )


                case SRD_OBJECT_HTMLTABLE:
                case SRD_OBJECT_HTMLGEN:
                    break;
            }
        }
        /// <summary>
        /// Načte data ze segmentu "datawindow"
        /// </summary>
        /// <param name="name"></param>
        /// <param name="values"></param>
        private void ConvertSrdSegmentDataWindow(string name, KeyValueSegmentList values)
        {   // datawindow(units=0 timer_interval=0 color=16777215 processing=0 HTMLDW=no print.documentname="" 
            //            print.orientation = 1 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 
            //            print.paper.source = 0 print.paper.size = 0 print.prompt=no print.buttons=no print.preview.buttons=no )
            this.Units = GetUnits(values, "units");
            this.Document.ReportProperties.BackColor = this.GetColor(values, "color");
            this.Document.ReportProperties.DocumentName = values.FindValue<string>("print.documentname", "");
            this.Document.ReportProperties.PageSize = PageSizeInfo.GetPageSize(values.FindValue<int>("print.paper.size", 0), 0);
            this.Document.ReportProperties.PageOrientation = this.GetPageOrientation(values, "print.orientation");
            this.Document.ReportProperties.PrintMargin = this.GetPadding(values, "print.margin");
        }
        /// <summary>
        /// Načte data ze segmentu "table"
        /// </summary>
        /// <param name="name"></param>
        /// <param name="values"></param>
        private void ConvertSrdSegmentTable(string name, KeyValueSegmentList values)
        {   // segment "table" obsahuje páry hodnot: column=(...) [opakovaně], a klíče: retrieve a arguments:
            ReportData reportData = this.Document.RootBand.ReportData;
            reportData.Clear();
            reportData.DataQueryEditEnabled = true;
            foreach (KeyValueSegment pair in values)
            {
                string key = pair.Key;
                switch (key)
                {
                    case SRD_TABLE_COLUMN:
                        this.ConvertSrdSegmentTableColumn(pair, reportData);
                        break;
                    case SRD_TABLE_RETRIEVE:
                        this.ConvertSrdSegmentTableRetrieve(pair, reportData);
                        break;
                    case SRD_TABLE_ARGUMENTS:
                        this.ConvertSrdSegmentTableArguments(pair, reportData);
                        break;
                }
            }
        }
        /// <summary>
        /// Zpracuje data jednoho columnu: načte je ze segmentu, a vloží do this.Document.RootBand.ReportData
        /// </summary>
        /// <param name="pair">Key+Value, kde Value obsahuje informace o sloupci</param>
        /// <param name="reportData">Data reportu</param>
        private void ConvertSrdSegmentTableColumn(KeyValueSegment pair, ReportData reportData)
        {   // column=(type=char(40) updatewhereclause=yes name=dil_nazev_subjektu dbname="dil_nazev_subjektu" )
            ParserSegmentValue segmentValue = pair.SegmentValues[0];          // (type=char(40) ... )
            if (!segmentValue.HasInnerSegment) return;
            KeyValueSegmentList values = ConvertSrdSplitValues(segmentValue); // Seznam párů: klíč=hodnota
            string type = values.FindValue<string>("type", "");
            string update = values.FindValue<string>("updatewhereclause", "");
            string name = values.FindValue<string>("name", "");               // Název používaný v reportu (v jednotlivých fields)
            string dbname = values.FindValue<string>("dbname", "");           // Název, pod nímž se data načtou z SQL serveru dotazem v Retrieve

            // Data uložit do columnů:
            reportData.Columns.Add(dbname, name, type);
        }
        /// <summary>
        /// Zpracuje příkaz Retrieve a vloží jej do this.Document.RootBand.ReportData
        /// </summary>
        /// <param name="pair">Key+Value, kde Value obsahuje informace o Retrieve</param>
        /// <param name="reportData">Data reportu</param>
        private void ConvertSrdSegmentTableRetrieve(KeyValueSegment pair, ReportData reportData)
        {
            this.Document.RootBand.ReportData.DataQuery = pair.Value;
            this.Document.RootBand.ReportData.RootClassNumber = 1180;
        }
        /// <summary>
        /// Zpracuje příkaz Arguments a vloží jej do this.Document.RootBand.ReportData
        /// </summary>
        /// <param name="pair">Key+Value, kde Value obsahuje informace o parametrech</param>
        /// <param name="reportData">Data reportu</param>
        private void ConvertSrdSegmentTableArguments(KeyValueSegment pair, ReportData reportData)
        {
            ParserSegment segment = null;
            ParserSegmentValue value = pair.SegmentValues.FirstOrDefault(v => v.HasInnerSegment && v.InnerSegment.SegmentName == SETTING_SEGM_PAR);
            while (value.HasInnerSegment)
            {
                segment = value.InnerSegment;
                if (segment.SegmentName == SETTING_SEGM_PAR && segment.ValueList.Count != 1) break;
                value = segment.ValueList.FirstOrDefault(v => v.HasInnerSegment && v.InnerSegment.SegmentName == SETTING_SEGM_PAR);
            }

            if (segment != null && segment.SegmentName == SETTING_SEGM_PAR && segment.ValueList.Count > 1)
            {
                KeyValueSegmentList values = ConvertSrdSplitArguments(segment.ParentValue); // Seznam párů: { "name", type [, "name2", type2...] }
                this.Document.RootBand.ReportData.Parameters.Import(values.ToParameterCollection());
            }
        }
        /// <summary>
        /// Načte data ze segmentů "header", "summary", "footer", "detail"
        /// </summary>
        /// <param name="name"></param>
        /// <param name="values"></param>
        private void ConvertSrdSegmentBand(string name, KeyValueSegmentList values)
        {   // header(height=360 color="536870912" )
            BandType type = GetBandType(name);
            float height = GetDimension(values, "height");
            Color color = GetColor(values, "color");
            this.AddBandSrd(type, name, height, color, 0, null);
        }
        /// <summary>
        /// Načte data ze segmentu "group"
        /// </summary>
        /// <param name="name"></param>
        /// <param name="values"></param>
        private void ConvertSrdSegmentGroup(string name, KeyValueSegmentList values)
        {   // group(level=1 header.height=80 trailer.height=12 by=("dil_cislo_subjektu" ) header.color="536870912" trailer.color="536870912" )
            string groupBy = values.FindValue<string>("by", "");
            int groupLevel = values.FindValue<int>("level", 0);

            float height = 0;
            Color color = GetColor(values, "header.color");
            this.AddBandSrd(BandType.GroupBase, "group" + groupLevel.ToString(), height, color, groupLevel - 1, groupBy);  // GroupLevel - 1 !!!
            
            height = GetDimension(values, "header.height");
            color = GetColor(values, "header.color");
            this.AddBandSrd(BandType.Header, "header", height, color, groupLevel, groupBy);

            height = GetDimension(values, "trailer.height");
            color = GetColor(values, "trailer.color");
            this.AddBandSrd(BandType.Footer, "trailer", height, color, groupLevel, groupBy);
        }
        /// <summary>
        /// Načte data ze segmentu "text"
        /// </summary>
        /// <param name="name"></param>
        /// <param name="values"></param>
        private void ConvertSrdSegmentText(string name, KeyValueSegmentList values)
        {   // text(band=header alignment="2" text="Alternativní komponenty TPV" border="0" color="0" x="1129" y="36" height="92" width="2048"  
            //      name=t_4  font.face="Arial CE" font.height="-14" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" 
            //      background.mode="1" background.color="553648127" )
            int ownerBandId = this.GetOwnerBandId(values);
            ReportBand ownerBand = this.Document.GetBand(ownerBandId);
            string text = values.FindValue<string>("text", "");
            RectangleF area = this.GetRectangle(values, "");
            ContentAlignment alignment = this.GetAlignment(values, "alignment");
            Font font = this.GetFont(values, "");

            this.Document.AddComponent(new ReportComponent(this.Document, 
                new ReportObjects.ReportObjectLabel()
                {
                    Alignment = alignment, 
                    Text = text,
                    Font = font 
                })
                {
                    OwnerTopBandId = ownerBandId,
                    RelativeBounds = RelativeRectangleF.CreateRelative(area, ownerBand.LogicalSize) 
                });
        }
        /// <summary>
        /// Načte data ze segmentu "column"
        /// </summary>
        /// <param name="name"></param>
        /// <param name="values"></param>
        private void ConvertSrdSegmentColumn(string name, KeyValueSegmentList values)
        {   // column(band=header.1 id=3 alignment="0" tabsequence=32766 border="0" color="0" x="526" y="4" height="76" width="1870" 
            //        format="[general]"  name=dil_nazev_subjektu edit.limit=40 edit.case=any edit.autoselect=yes edit.autohscroll=yes  
            //        font.face="Arial CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" 
            //        background.mode="1" background.color="536870912" )

            // column(band=detail id=6 alignment="0" tabsequence=32766 border="0" color="0" x="46" y="100" height="117" width="1573" 
            //        format="[general]"  name=hotline_polozka_problem  resizeable=1  moveable=1 height.autosize=yes edit.limit=4099 
            //        edit.case=any edit.focusrectangle=no edit.autoselect=yes  
            //        font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18"
            //        background.mode="1" background.color="536870912" )
            int ownerBandId = this.GetOwnerBandId(values);
            ReportBand ownerBand = this.Document.GetBand(ownerBandId);
            string sourceData = this.Document.RootBand.HeaderText;
            string sourceColumn = values.FindValue<string>("name", "");
            string format = values.FindValue<string>("format", "");
            RectangleF area = this.GetRectangle(values, "");
            ContentAlignment alignment = this.GetAlignment(values, "alignment");
            Font font = this.GetFont(values, "");
            Color backColor = this.GetColor(values, "background.color");
            bool autosizeHeight = this.GetBoolean(values, "height.autosize");

            this.Document.AddComponent(new ReportComponent(this.Document,
                new ReportObjects.ReportObjectField()
                {
                    Alignment = alignment,
                    DataSource = sourceData,
                    SourceColumn = sourceColumn,
                    Format = format,
                    AutosizeHeight = autosizeHeight,
                    Font = font,
                    BackColor = backColor
                })
            {
                OwnerTopBandId = ownerBandId,
                RelativeBounds = RelativeRectangleF.CreateRelative(area, ownerBand.LogicalSize)
            });
        }
        /// <summary>
        /// Načte data ze segmentu "compute"
        /// </summary>
        /// <param name="name"></param>
        /// <param name="values"></param>
        private void ConvertSrdSegmentCompute(string name, KeyValueSegmentList values)
        {   // compute(band=trailer.1 alignment="0" expression="year( today() )"border="0" color="0" x="590" y="324" height="92" width="297"
            //         format="[GENERAL]"  name=compute_1  font.face="Arial CE" font.height="-14" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" 
            //         background.mode="1" background.color="536870912" )
            // compute(band=trailer.1 alignment="1" expression="sum (   dotnet_hod for group 1 )"border="0" 
            //         color="0" x="2761" y="16" height="64" width="357" format="##,###,###,##0.00"  name=compute_4  
            //         font.face="Arial CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" 
            //         background.mode="1" background.color="536870912" )

            int ownerBandId = this.GetOwnerBandId(values);
            ReportBand ownerBand = this.Document.GetBand(ownerBandId);
            string sourceData = this.Document.RootBand.HeaderText;
            string sourceColumn = values.FindValue<string>("expression", "");
            string format = values.FindValue<string>("format", "");
            RectangleF area = this.GetRectangle(values, "");
            ContentAlignment alignment = this.GetAlignment(values, "alignment");
            Font font = this.GetFont(values, "");
            Color backColor = this.GetColor(values, "background.color");

            this.Document.AddComponent(new ReportComponent(this.Document,
                new ReportObjects.ReportObjectField()
                {
                    Alignment = alignment,
                    DataSource = sourceData,
                    SourceColumn = sourceColumn,
                    Format = format,
                    Font = font,
                    BackColor = backColor
                })
            {
                OwnerTopBandId = ownerBandId,
                RelativeBounds = RelativeRectangleF.CreateRelative(area, ownerBand.LogicalSize)
            });
        }
        /// <summary>
        /// Načte data ze segmentu "rectangle"
        /// </summary>
        /// <param name="name"></param>
        /// <param name="values"></param>
        private void ConvertSrdSegmentRectangle(string name, KeyValueSegmentList values)
        {   // rectangle(band=detail x="4256" y="0" height="80" width="219"  name=ramec1 visible="1~tif( alt_used_here = 0, 1, 0)"
            //           slideup=allabove brush.hatch="7" brush.color="553582847" pen.style="0" pen.width="9" pen.color="0"  
            //           background.mode="2" background.color="16777215" )
            int ownerBandId = this.GetOwnerBandId(values);
            ReportBand ownerBand = this.Document.GetBand(ownerBandId);
            RectangleF area = this.GetRectangle(values, "");
            Color backColor = this.GetColor(values, "background.color");
            Color borderColor = this.GetColor(values, "pen.color");
            float borderWidth = this.GetDimension(values, "pen.width");

            this.Document.AddComponent(new ReportComponent(this.Document,
                new ReportObjects.ReportObjectShape()
                {
                    Shape = ReportObjects.ShapeType.Rectangle,
                    BackColor = backColor,
                    BorderColor = borderColor,
                    BorderWidth = borderWidth
                })
            {
                OwnerTopBandId = ownerBandId,
                RelativeBounds = RelativeRectangleF.CreateRelative(area, ownerBand.LogicalSize)
            });
        }

        /// <summary>
        /// Načte data ze segmentu "report"
        /// </summary>
        /// <param name="name"></param>
        /// <param name="values"></param>
        private void ConvertSrdSegmentNested(string name, KeyValueSegmentList values)
        {   // report(band=detail dataobject="dw_nested_fa_vydana_splatky" x="18" y="0" height="72" width="3323" border="0" 
            //        height.autosize=yes criteria="" nest_arguments=((" cislo_subjektu ")) trail_footer = yes  name=dw_1  
            //        slideup=directlyabove )
            int ownerBandId = this.GetOwnerBandId(values);
            ReportBand ownerBand = this.Document.GetBand(ownerBandId);
            RectangleF area = this.GetRectangle(values, "");
            Color backColor = this.GetColor(values, "background.color");
            Color borderColor = this.GetColor(values, "pen.color");
            float borderWidth = this.GetDimension(values, "pen.width");

            // qqq;

            this.Document.AddComponent(new ReportComponent(this.Document,
                new ReportObjects.ReportObjectShape()
                {
                    Shape = ReportObjects.ShapeType.Rectangle,
                    BackColor = backColor,
                    BorderColor = borderColor,
                    BorderWidth = borderWidth
                })
            {
                OwnerTopBandId = ownerBandId,
                RelativeBounds = RelativeRectangleF.CreateRelative(area, ownerBand.LogicalSize)
            });
        }
        

        #endregion
        #region Konvertory (jednotky, míry, barvy)
        /// <summary>
        /// Vrátí typ Bandu podle jeho názvu. Pouze pro Bandy základní úrovně, ne grupy.
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        private BandType GetBandType(string name)
        {
            switch (name)
            {
                case SRD_BAND_HEADER: return BandType.Header;
                case SRD_BAND_DETAIL: return BandType.Detail;
                case SRD_BAND_FOOTER: return BandType.Footer;
                case SRD_BAND_SUMMARY: return BandType.Summary;
            }
            return BandType.None;
        }
        /// <summary>
        /// Vrátí jednotku měr
        /// </summary>
        /// <param name="values"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        private Pb7Units GetUnits(KeyValueSegmentList values, string name)
        {
            int units = values.FindValue<int>("units", 0);
            switch (units)
            {
                case 0: return Pb7Units.Native;
                case 1: return Pb7Units.Pixel;
                case 2: return Pb7Units.Inch;
                case 3: return Pb7Units.Centimeter;
            }
            return Pb7Units.Native;
        }
        /// <summary>
        /// Vrátí zarovnání prvku
        /// </summary>
        /// <param name="values"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        private ContentAlignment GetAlignment(KeyValueSegmentList values, string name)
        {
            int alignment = values.FindValue<int>(name, 0);
            switch (alignment)
            {
                case 0: return ContentAlignment.TopLeft;
                case 1: return ContentAlignment.TopRight;
                case 2: return ContentAlignment.TopCenter;
                case 3: return ContentAlignment.TopLeft;    // Justify
            }
            return ContentAlignment.TopLeft;
        }
        /// <summary>
        /// Vrátí rozměr převedený na milimetry
        /// </summary>
        /// <param name="values"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        private float GetDimension(KeyValueSegmentList values, string name)
        {
            int dimension = values.FindValue<int>(name, 0);
            return (float)dimension * this.UnitCoefficient / 100f ;
        }
        /// <summary>
        /// Vrátí rectangle, který je specifikován hodnotami x, y, height, width (s daným prefixem).
        /// </summary>
        /// <param name="values"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        private RectangleF GetRectangle(KeyValueSegmentList values, string name)
        {
            string prefix = (String.IsNullOrEmpty(name) ? "" : name + ".");
            float x = this.GetDimension(values, prefix + "x");
            float y = this.GetDimension(values, prefix + "y");
            float width = this.GetDimension(values, prefix + "width");
            float height = this.GetDimension(values, prefix + "height");
            return new RectangleF(x, y, width, height);
        }
        /// <summary>
        /// Načte a vrátí okraje
        /// </summary>
        /// <param name="values"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        private PaddingF GetPadding(KeyValueSegmentList values, string name)
        {   // print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96
            string prefix = (String.IsNullOrEmpty(name) ? "" : name + ".");
            float top = this.GetDimension(values, prefix + "top");
            float left = this.GetDimension(values, prefix + "left");
            float right = this.GetDimension(values, prefix + "right");
            float bottom = this.GetDimension(values, prefix + "bottom");
            return new PaddingF(top, left, right, bottom);
        }
        /// <summary>
        /// Vrátí boolean
        /// </summary>
        /// <param name="values"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        private bool GetBoolean(KeyValueSegmentList values, string name)
        {
            string value = values.FindValue<string>(name, "");
            return (value == "yes");
        }
        /// <summary>
        /// Vrátí barvu
        /// </summary>
        /// <param name="values"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        private Color GetColor(KeyValueSegmentList values, string name)
        {
            Int32 color = values.FindValue<Int32>(name, 0);
            string c = color.ToString("X8");
            if (c == "20000000") return Color.White;

            int a = ((color >> 16) & 0x0000ff00) >> 8;
            if (a > 0) return Color.White;

            int r = color & 0x000000ff;
            int g = (color & 0x0000ff00) >> 8;
            int b = (color & 0x00ff0000) >> 16;
            Color result = Color.FromArgb(r, g, b);
            return result;
        }
        /// <summary>
        /// Vrátí font
        /// </summary>
        /// <param name="values"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        private Font GetFont(KeyValueSegmentList values, string name)
        {   // font.face="Arial CE" font.height="-14" font.weight="700"  font.family="2" font.pitch="2" font.charset="238"
            string prefix = (String.IsNullOrEmpty(name) ? "" : name + ".");
            string fontName = values.FindValue<string>(prefix + "font.face", "");
            int fontSize = -values.FindValue<int>(prefix + "font.height", 0);
            int fontWeight = values.FindValue<int>(prefix + "font.weight", 0);
            int fontFamily = values.FindValue<int>(prefix + "font.family", 0);
            int fontPitch = values.FindValue<int>(prefix + "font.pitch", 0);
            int fontCharset = values.FindValue<int>(prefix + "font.charset", 0);
            FontStyle fontStyle = (fontWeight >= 600 ? FontStyle.Bold : FontStyle.Regular);
            Font font = null;
            try
            {
                font = new Font(fontName, fontSize, fontStyle);
            }
            catch (Exception)
            {
                font = (Font)this.Document.DefaultFont.Clone();
            }
            return font;
        }
        /// <summary>
        /// Vrátí orientaci stránky
        /// </summary>
        /// <param name="values"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        private PageOrientationType GetPageOrientation(KeyValueSegmentList values, string name)
        {
            int orientation = values.FindValue<int>(name, 0);
            if (orientation == 0 || orientation == 1 || orientation == 2)
                return (PageOrientationType)orientation;
            return PageOrientationType.Default;
        }
        /// <summary>
        /// Vrátí ID bandu, do něhož spadá komponenta podle načtených hodnot
        /// </summary>
        /// <param name="values"></param>
        /// <returns></returns>
        private int GetOwnerBandId(KeyValueSegmentList values)
        {
            string band = values.FindValue<string>("band", "");
            int ownerBandId = this.BandNameIds[band];
            return ownerBandId;
        }
        #endregion
        #region Mezipaměť na data pro ReportBand, sestavení logického modelu z dat SRD, odpovídající třída BandSrd
        /// <summary>
        /// Přidá data pro Band do mezipaměti.
        /// Pokud mezipaměť již byla zpracována, ohlásí chybu.
        /// </summary>
        /// <param name="bandType"></param>
        /// <param name="name"></param>
        /// <param name="height"></param>
        /// <param name="color"></param>
        /// <param name="groupLevel"></param>
        /// <param name="groupExpression"></param>
        private void AddBandSrd(BandType bandType, string name, float height, Color color, int groupLevel, string groupExpression)
        {
            if (this.BandSrdList == null)
                throw new UserException("Unable to add additional headers after being processed.");
            BandSrd band = new BandSrd() { BandType = bandType, Name = name, Height = height, Color = color, GroupLevel = groupLevel, GroupExpression = groupExpression };
            this.BandSrdList.Add(band);
        }
        /// <summary>
        /// Metoda prověří, zda jsou nastřádané prvky v this.BandSrdList, a pokud ano, pak z nich vytvoří sadu Bands do dokumentu.
        /// Po zpracování vloží do this.BandSrdList hodnotu null.
        /// Pokud už byly prvky zpracovány a v this.BandSrdList je null, tak nedělá nic.
        /// Metodu je vhodné volat před přidáním každé komponenty.
        /// </summary>
        private void CheckBandSrdProcessed()
        {
            if (this.BandSrdList == null) return;

            this.BandNameIds = new Dictionary<string, int>();

            // Musíme udělat jednu úpravu: band typu Detail (existuje jen jeden, a je psán do levelu 0)
            // je třeba dát do nejvyšší grupy, aby se zobrazoval v ní:
            int maxGroup = this.BandSrdList.Max(b => b.GroupLevel);
            foreach (BandSrd b in this.BandSrdList.Where(b => b.BandType == BandType.Detail))
                b.GroupLevel = maxGroup;
            // Nyní setřídíme Bands podle GroupLevel a BandType:
            this.BandSrdList.Sort(BandSrd.CompareByOrder);

            Dictionary<int, int> ownerIds = new Dictionary<int, int>();
            ownerIds.Add(0, this.Document.RootBand.BandId);
            foreach (BandSrd bandSrd in this.BandSrdList)
            {
                // Owner tohoto bandu:
                int ownerBandId = ownerIds[0];
                if (bandSrd.GroupLevel > 0) // && bandSrd.BandType != BandType.GroupBase)
                    ownerBandId = ownerIds[bandSrd.GroupLevel];

                // Band do dokumentu:
                ReportBand band = new ReportBand(this.Document, bandSrd.RepBandType);
                band.OwnerBandId = ownerBandId;
                band.HeaderText = bandSrd.Name;
                band.LogicalHeight = bandSrd.Height;
                band.HeaderBackColor = bandSrd.Color;
                this.Document.AddBand(band);

                if (bandSrd.BandType == BandType.GroupBase)
                    ownerIds.Add(bandSrd.GroupLevel + 1, band.BandId);

                // Název a ID do místního indexu:
                this.BandNameIds.Add(bandSrd.BandSrdName, band.BandId);
            }

            this.BandSrdList = null;
        }
        /// <summary>
        /// Mezipaměť dat Bands, plní se z prvků typu header, detail, ..., group.
        /// Zpracovává se před první komponentou, pomocí metody this.CheckBandSrdProcessed().
        /// </summary>
        private List<BandSrd> BandSrdList;
        /// <summary>
        /// Výsledná paměť (index), která podle klíče bandu určí jeho ID.
        /// Vytváří se při zpracování BandSrdList v metodě this.CheckBandSrdProcessed().
        /// </summary>
        private Dictionary<string, int> BandNameIds;
        /// <summary>
        /// Třída pro uchování dat o bandech v mezipaměti
        /// </summary>
        private class BandSrd
        {
            public BandType BandType;
            public string Name;
            public float Height;
            public Color Color;
            public int GroupLevel;
            /// <summary>
            /// Typ Bandu v rámci Reportu
            /// </summary>
            public ReportBandType RepBandType
            {
                get
                {
                    switch (this.BandType)
                    {
                        case Pb7Loader.BandType.Header: return ((this.GroupLevel > 0) ? ReportBandType.GroupHeader : ReportBandType.PageHeader);
                        case Pb7Loader.BandType.Title: return ReportBandType.Title;
                        case Pb7Loader.BandType.GroupBase: return ReportBandType.Group;
                        case Pb7Loader.BandType.Detail: return ReportBandType.Detail;
                        case Pb7Loader.BandType.Summary: return ReportBandType.Summary;
                        case Pb7Loader.BandType.Footer: return ((this.GroupLevel > 0) ? ReportBandType.GroupFooter : ReportBandType.PageFooter);
                    }
                    return ReportBandType.None;
                }
            }
            public string GroupExpression;
            public string BandSrdName
            {
                get
                {
                    if (this.BandType == Pb7Loader.BandType.GroupBase)
                        return "group." + (this.GroupLevel + 1).ToString();
                    if (this.GroupLevel == 0 || this.BandType == Pb7Loader.BandType.Detail)
                        return this.Name;
                    switch (this.BandType)
                    {
                        case Pb7Loader.BandType.Header:
                            return "header." + this.GroupLevel.ToString();
                        case Pb7Loader.BandType.Footer:
                            return "trailer." + this.GroupLevel.ToString();
                    }
                    return this.Name + "." + this.GroupLevel.ToString();
                }
            }
            /// <summary>
            /// Vizualizace
            /// </summary>
            /// <returns></returns>
            public override string ToString()
            {
                return this.Name + (this.GroupLevel == 0 ? "" : " Group " + this.GroupLevel.ToString() + "; by: " + this.GroupExpression);
            }
            /// <summary>
            /// Komparátor pro List.Sort()
            /// Na první místa dává položky podle čísla GroupLevel.
            /// v rámci shodné grupy pak podle pořadí BandType.
            /// </summary>
            /// <param name="a"></param>
            /// <param name="b"></param>
            /// <returns></returns>
            public static int CompareByOrder(BandSrd a, BandSrd b)
            {
                int cmp;
                cmp = a.GroupLevel.CompareTo(b.GroupLevel);
                if (cmp != 0) return cmp;
                cmp = ((int)a.BandType).CompareTo((int)b.BandType);
                return cmp;
            }
        }
        private enum BandType : int
        {
            None = 0,
            Header,
            Title,
            /// <summary>
            /// Základna grupy. Tato základna má GroupLevel o 1 nižší než ostatní Bands grupy (Header a Trailer),
            /// to proto, aby se základna zatřídila mezi položky vyšší úrovně jako jedna z nich (typicky místo detailu).
            /// </summary>
            GroupBase,
            Detail,
            Summary,
            Footer
        }
        #endregion
        #region Vytvoření seznamu KeyValueSegment list, odpovídající třída KeyValueSegmentList
        /// <summary>
        /// Vytvoří seznam Key-Value z dat dodaného segmentu.
        /// Segment očekáváme v tvaru: { key1 = value1 key2 = value2 key3 = value3 } atd.
        /// Key musí být Text, musí být pouze jeden před znakem rovnítko.
        /// Value může být libovolná sekvence Value, delimitery, InnerSegment. Přebírá se od rovnítka do příštího Key.
        /// Příklad komplikovanějšího segmentu: { key1 = func1(25+3) * func2 (bbb) key2 = func3() + "text" key3 = 0 }
        /// </summary>
        /// <param name="segmentValue"></param>
        /// <returns></returns>
        private static KeyValueSegmentList ConvertSrdSplitValues(ParserSegmentValue segmentValue)
        {
            KeyValueSegmentList result = new KeyValueSegmentList();
            if (segmentValue.HasInnerSegment)
            {
                List<ParserSegmentValue> values = segmentValue.InnerSegment.ValueList;
                // Segment obsahuje formulaci: { key1 = value1 key2 = value2 key3 = value3 } atd.
                // Přičemž jako "value" nemusí být jeden objekt ParserSegmentValue, ale může jich být více: 
                //   typicky "max(columns)" jsou dvě Values za sebou: "max" a "(columns)", přičemž "(columns)" je segment.
                // Zpracuji tedy segment následovně: 
                //   - nejprve najdu indexy prvků, které jsou "="
                //   - pak ke každému "=" najdu index prvku před ním = key
                //   - pak všechno od "=" k příštímu "key" je "value", s tím že do Value beru i vnitřní delimitery (ale ne vnější).
                for (int q = 0; q < values.Count; q++)
                {
                    ParserSegmentValue value = values[q];
                    if (value.ValueType == ParserSegmentValueType.Delimiter && value.Text == "=")
                    {   // Našli jsme rovnítko:
                        for (int k = q - 1; k >= 0; k--)
                        {   // Dohledáme klíč vlevo před rovnítkem:
                            ParserSegmentValue key = values[k];
                            if (key.ValueType == ParserSegmentValueType.Text)
                            {
                                KeyValueSegment pair = new KeyValueSegment(k, key.Text, q);
                                result.Add(pair);
                                break;
                            }
                        }
                    }
                }

                // Nyní pro každý ParserSegmentValue najdu všechny Values za jeho rovnítkem před příštím Key (anebo do konce), a to bude Value daného páru:
                for (int p = 0; p < result.Count; p++)
                {
                    KeyValueSegment pair = result[p];
                    int firstValueIndex = pair.EqualIndex + 1;
                    int nextKeyIndex = (p < (result.Count - 1) ? result[p + 1].KeyIndex : values.Count);     // Hodnota indexu, kterou již do "value" brát nebudu
                    pair.AddValues(values.GetRange(firstValueIndex, nextKeyIndex - firstValueIndex));        // Řada hodnot, které patří do Values daného pair
                }
            }
            return result;
        }
        /// <summary>
        /// Vytvoří seznam Key-Value z dat dodaného segmentu.
        /// Segment očekáváme v tvaru: { "name", type [, "name2", type2...] }.
        /// Key je segment v uvozovkách, Value je text za čárkou.
        /// </summary>
        /// <param name="segmentValue"></param>
        /// <returns></returns>
        private static KeyValueSegmentList ConvertSrdSplitArguments(ParserSegmentValue segmentValue)
        {
            KeyValueSegmentList result = new KeyValueSegmentList();
            if (segmentValue.HasInnerSegment)
            {
                int keyIndex = -1;
                int equalIndex = -1;
                string key = null;
                KeyValueSegment pair = null;
                List<ParserSegmentValue> values = segmentValue.InnerSegment.ValueList;
                for (int v = 0; v < values.Count; v++)
                {
                    ParserSegmentValue value = values[v];
                    if (value.ValueType == ParserSegmentValueType.InnerSegment && value.InnerSegment.SegmentName == SETTING_SEGM_STRING && key == null && pair == null)
                    {   // "key":
                        keyIndex = v;
                        key = value.InnerSegment.InnerText;
                    }
                    else if (value.ValueType == ParserSegmentValueType.Delimiter && value.Text == "," && key != null && pair == null)
                    {
                        equalIndex = v;
                        pair = new KeyValueSegment(keyIndex, key, equalIndex);
                        result.Add(pair);
                        key = null;
                    }
                    else if (pair != null && value.ValueType == ParserSegmentValueType.Text)
                    {
                        pair.AddValue(value);
                        pair = null;
                    }
                }
            }
            return result;
        }
        /// <summary>
        /// Seznam triád Key-Value-Segment
        /// </summary>
        private class KeyValueSegmentList : List<KeyValueSegment>
        {
            /// <summary>
            /// Najde hodnotu podle názvu a vrátí ji v daném typu
            /// </summary>
            /// <typeparam name="T"></typeparam>
            /// <param name="name"></param>
            /// <param name="defaultValue"></param>
            /// <returns></returns>
            public T FindValue<T>(string name, T defaultValue)
            {
                KeyValueSegment item = this.FirstOrDefault(kvp => kvp.Key == name);
                if (item == null) return defaultValue;

                if (typeof(T).Equals(typeof(String)))
                    return (T)(object)item.Value;
                if (typeof(T).Equals(typeof(Byte)))
                    return (T)Convertor.StringToByte(item.Value);
                if (typeof(T).Equals(typeof(Color)))
                    return (T)Convertor.StringToColor(item.Value);
                if (typeof(T).Equals(typeof(DateTime)))
                    return (T)Convertor.StringToDateTime(item.Value);
                if (typeof(T).Equals(typeof(DateTimeOffset)))
                    return (T)Convertor.StringToDateTimeOffset(item.Value);
                if (typeof(T).Equals(typeof(Decimal)))
                    return (T)Convertor.StringToDecimal(item.Value);
                if (typeof(T).Equals(typeof(Double)))
                    return (T)Convertor.StringToDouble(item.Value);
                if (typeof(T).Equals(typeof(Char)))
                    return (T)Convertor.StringToChar(item.Value);
                if (typeof(T).Equals(typeof(Int16)))
                    return (T)Convertor.StringToInt16(item.Value);
                if (typeof(T).Equals(typeof(Int32)))
                    return (T)Convertor.StringToInt32(item.Value);
                if (typeof(T).Equals(typeof(Int64)))
                    return (T)Convertor.StringToInt64(item.Value);
                if (typeof(T).Equals(typeof(SByte)))
                    return (T)Convertor.StringToSByte(item.Value);
                if (typeof(T).Equals(typeof(Single)))
                    return (T)Convertor.StringToSingle(item.Value);
                if (typeof(T).Equals(typeof(TimeSpan)))
                    return (T)Convertor.StringToTimeSpan(item.Value);
                if (typeof(T).Equals(typeof(UInt16)))
                    return (T)Convertor.StringToUInt16(item.Value);
                if (typeof(T).Equals(typeof(UInt32)))
                    return (T)Convertor.StringToUInt32(item.Value);
                if (typeof(T).Equals(typeof(UInt64)))
                    return (T)Convertor.StringToUInt64(item.Value);

                return defaultValue;
            }
            /// <summary>
            /// Svoje hodnoty konvertuje na seznam parametrů
            /// </summary>
            /// <returns></returns>
            public ReportDataParamCollection ToParameterCollection()
            {
                ReportDataParamCollection collection = new ReportDataParamCollection();
                foreach (KeyValueSegment pair in this)
                    collection.Add(":" + pair.Key, ConvertParamType(pair.Value));
                return collection;
            }
            /// <summary>
            /// Vrátí datový typ parametru (DataType) podle daného názvu typu (powerbuildrovský název typu).
            /// </summary>
            /// <param name="value"></param>
            /// <returns></returns>
            private ReportColumnDataType ConvertParamType(string value)
            {
                switch (value.Trim().ToLower())
                {
                    case "numeric": return ReportColumnDataType.Int;
                    case "number": return ReportColumnDataType.Int;
                }
                // Necháme si poradit od odborníků:
                return ReportData.ConvertParamType(value);
            }
        }
        /// <summary>
        /// Triáda Key-Value-Segment.
        /// Nese klíč, textovou hodnotu a současně seznam ParserSegmentValue, které tvoří hodnotu (pro pozdější snadné další parsování vnitřku)
        /// </summary>
        private class KeyValueSegment
        {
            /// <summary>
            /// Konstruktor
            /// </summary>
            /// <param name="keyIndex"></param>
            /// <param name="key"></param>
            /// <param name="equalIndex"></param>
            public KeyValueSegment(int keyIndex, string key, int equalIndex)
            {
                this._KeyIndex = keyIndex;
                this._Key = key;
                this._EqualIndex = equalIndex;
                this._Value = null;
                this._SegmentValues = null;
            }
            private int _KeyIndex;
            private int _EqualIndex;
            private string _Key;
            private string _Value;
            private List<ParserSegmentValue> _SegmentValues;
            /// <summary>
            /// Vizualizace
            /// </summary>
            /// <returns></returns>
            public override string ToString()
            {
                return this.Key + (this._SegmentValues == null ? "" : "=" + this.Value);
            }
            /// <summary>
            /// Pozice value která je Key
            /// </summary>
            public int KeyIndex { get { return this._KeyIndex; } }
            /// <summary>
            /// Pozice delimiteru "="
            /// </summary>
            public int EqualIndex { get { return this._EqualIndex; } }
            /// <summary>
            /// Textový klíč
            /// </summary>
            public string Key { get { return this._Key; } }
            /// <summary>
            /// Textová hodnota
            /// </summary>
            public string Value { get { return this._Value; } }
            /// <summary>
            /// SegmentValue
            /// </summary>
            public List<ParserSegmentValue> SegmentValues { get { return this._SegmentValues; } }
            /// <summary>
            /// Přidá do sebe další Value
            /// </summary>
            /// <param name="values"></param>
            public void AddValue(ParserSegmentValue value)
            {
                if (this._SegmentValues == null)
                    this._SegmentValues = new List<ParserSegmentValue>();
                if (value != null)
                {
                    this._SegmentValues.Add(value);
                    string text = "";
                    foreach (ParserSegmentValue v in this._SegmentValues)
                        text += v.Text;
                    text = text.Trim();

                    // Odstranit uvozovky na začátku a na konci:
                    int length = text.Length;
                    if (length >= 2 && text[0] == '\"' && text[length - 1] == '\"')
                        text = text.Substring(1, length - 2);

                    this._Value = text.Trim();
                }
            }
            /// <summary>
            /// Přidá do sebe další Values
            /// </summary>
            /// <param name="values"></param>
            public void AddValues(List<ParserSegmentValue> values)
            {
                if (this._SegmentValues == null)
                    this._SegmentValues = new List<ParserSegmentValue>();
                if (values != null)
                {
                    this._SegmentValues.AddRange(values);
                    string text = "";
                    foreach (ParserSegmentValue value in this._SegmentValues)
                        text += value.Text;
                    text = text.Trim();
                    
                    // Odstranit uvozovky na začátku a na konci:
                    int length = text.Length;
                    if (length >= 2 && text[0] == '\"' && text[length - 1] == '\"')
                        text = text.Substring(1, length - 2);

                    this._Value = text.Trim();
                }
            }
        }
        #endregion
        #region Konstanty, enum
        /// <summary>
        /// Záhlaví souboru ve formátu PB.SRD
        /// </summary>
        public const string SRD_HEADER = "$PBExportHeader$";
        /// <summary>
        /// Záhlaví verze souboru ve formátu PB.SRD release (bez čísla)
        /// </summary>
        public const string SRD_RELEASE = "release ";
        /// <summary>
        /// Záhlaví verze souboru ve formátu PB.SRD release 1
        /// </summary>
        public const string SRD_RELEASE1 = "release 1;";
        /// <summary>
        /// Záhlaví verze souboru ve formátu PB.SRD release 2
        /// </summary>
        public const string SRD_RELEASE2 = "release 2;";
        /// <summary>
        /// Záhlaví verze souboru ve formátu PB.SRD release 3
        /// </summary>
        public const string SRD_RELEASE3 = "release 3;";
        /// <summary>
        /// Záhlaví verze souboru ve formátu PB.SRD release 4
        /// </summary>
        public const string SRD_RELEASE4 = "release 4;";
        /// <summary>
        /// Záhlaví verze souboru ve formátu PB.SRD release 5
        /// </summary>
        public const string SRD_RELEASE5 = "release 5;";
        /// <summary>
        /// Záhlaví verze souboru ve formátu PB.SRD release 6
        /// </summary>
        public const string SRD_RELEASE6 = "release 6;";
        /// <summary>
        /// Záhlaví verze souboru ve formátu PB.SRD release 7
        /// </summary>
        public const string SRD_RELEASE7 = "release 7;";
        private const string SRD_DATAWINDOW = "datawindow";
        private const string SRD_BAND_HEADER = "header";
        private const string SRD_BAND_DETAIL = "detail";
        private const string SRD_BAND_SUMMARY = "summary";
        private const string SRD_BAND_FOOTER = "footer";
        private const string SRD_DATA_TABLE = "table";
        private const string SRD_TABLE_COLUMN = "column";
        private const string SRD_TABLE_RETRIEVE = "retrieve";
        private const string SRD_TABLE_ARGUMENTS = "arguments";
        private const string SRD_GROUP = "group";
        private const string SRD_OBJECT_TEXT = "text";
        private const string SRD_OBJECT_COLUMN = "column";
        private const string SRD_OBJECT_COMPUTE = "compute";
        private const string SRD_OBJECT_LINE = "line";
        private const string SRD_OBJECT_RECTANGLE = "rectangle";
        private const string SRD_OBJECT_REPORT = "report";
        private const string SRD_OBJECT_HTMLTABLE = "htmltable";
        private const string SRD_OBJECT_HTMLGEN = "htmlgen";
        // private const string SRD_ = "";
        #endregion
        #endregion
    }

    #region Ukázky SRD
    /* 
     * 
     *   Poznámky k načítání reportu z PowerBuilderu:
     *  1. Je třeba exportovat z PBL do SRD. Formát PBL je interní a nečitelný. Co jedna sestava to jeden soubor SRD.
     *  2. Formát SRD dovoluje standardní parsování.
     *  


$PBExportHeader$dw_rekl_pred_res.srd
release 5;
datawindow(units=0 timer_interval=0 color=16777215 processing=0 print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 97 print.margin.bottom = 97 print.paper.source = 0 print.paper.size = 0 print.prompt=no )
header(height=461 color="536870912" )
summary(height=1 color="-1" )
footer(height=1 color="-1" )
detail(height=81 color="-1" )
table(column=(type=long updatewhereclause=yes name=inf_o_programu_cislo_subjektu dbname="inf_o_programu.cislo_subjektu" )
 column=(type=char(30) updatewhereclause=yes name=subjekty_reference_subjektu dbname="inf_o_programu.reference_subjektu" )
 column=(type=char(40) updatewhereclause=yes name=subjekty_nazev_subjektu dbname="inf_o_programu.nazev_subjektu" )
 column=(type=long updatewhereclause=yes name=inf_o_programu_vlastnik dbname="inf_o_programu.vlastnik" )
 column=(type=char(40) updatewhereclause=yes name=vlastnik_nazev dbname="inf_o_programu.vlastnik_nazev" )
 column=(type=datetime updatewhereclause=yes name=datum_porizeni dbname="inf_o_programu.datum_porizeni" )
 column=(type=datetime updatewhereclause=yes name=datum_zahajeni_realita dbname="inf_o_programu.datum_zahajeni_realita" )
 column=(type=datetime updatewhereclause=yes name=datum_ukonceni_realita dbname="inf_o_programu.datum_ukonceni_realita" )
 column=(type=datetime updatewhereclause=yes name=datum_zahajeni_plan dbname="inf_o_programu.datum_zahajeni_plan" )
 column=(type=datetime updatewhereclause=yes name=datum_ukonceni_plan dbname="inf_o_programu.datum_ukonceni_plan" )
 column=(type=char(1) updatewhereclause=yes name=kategorie_reklamace dbname="inf_o_programu.kategorie_reklamace" )
 retrieve="SELECT lcs.inf_o_programu.cislo_subjektu, 
subjekty_a.reference_subjektu, 
subjekty_a.nazev_subjektu, 
lcs.inf_o_programu.vlastnik, 
subjekty_b.nazev_subjektu vlastnik_nazev, 
lcs.inf_o_programu.datum_porizeni, 
lcs.inf_o_programu.datum_zahajeni_realita, 
lcs.inf_o_programu.datum_ukonceni_realita, 
lcs.inf_o_programu.datum_zahajeni_plan, 
lcs.inf_o_programu.datum_ukonceni_plan, 
lcs.inf_o_programu.kategorie_reklamace   
FROM lcs.inf_o_programu 
JOIN lcs.subjekty subjekty_a ON lcs.inf_o_programu.cislo_subjektu = subjekty_a.cislo_subjektu
LEFT OUTER JOIN lcs.subjekty subjekty_b ON lcs.inf_o_programu.vlastnik = subjekty_b.cislo_subjektu
WHERE ( lcs.inf_o_programu.reklamace = 'A' ) and 
( lcs.inf_o_programu.stav <> '2' ) 

ORDER BY subjekty_a.reference_subjektu " )
text(band=header alignment="2" text="Reklamace před řešením"border="0" color="0" x="1002" y="256" height="97" width="1070"  font.face="Times New Roman CE" font.height="-16" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="553648127" )
compute(band=header alignment="0" expression="fg_org_vlast_nazev()"border="0" color="0" x="19" y="20" height="157" width="2273" format="[general]"  font.face="Times New Roman CE" font.height="-16" font.weight="700"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="553648127" )
text(band=header alignment="0" text="Datum:"border="0" color="0" x="2716" y="20" height="65" width="174"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="553648127" )
compute(band=header alignment="1" expression="today()"border="0" color="0" x="2908" y="20" height="65" width="311" format="dd.mm.yyyy"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="553648127" )
compute(band=header alignment="1" expression="'Strana ' + page() + ' z ' + pageCount()"border="0" color="0" x="2629" y="116" height="65" width="590" format="[general]"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="Číslo:"border="4" color="0" x="28" y="384" height="65" width="229"  name=subjekty_reference_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Vlastník:"border="4" color="0" x="1271" y="384" height="65" width="494"  name=vlastnik_nazev_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Název:"border="4" color="0" x="270" y="384" height="65" width="983"  name=subjekty_nazev_subjektu_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Pořízeno:"border="4" color="0" x="1779" y="384" height="65" width="284"  name=datum_porizeni_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Zahájení plán:"border="4" color="0" x="2076" y="384" height="65" width="439"  name=datum_zahajeni_plan_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Ukonč. plán:"border="4" color="0" x="2533" y="384" height="65" width="439"  name=datum_ukonceni_plan_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="D"border="4" color="0" x="3109" y="384" height="65" width="106"  name=delta_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Kat."border="4" color="0" x="2986" y="384" height="65" width="110"  name=kategorie_reklamace_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
column(band=detail id=2 alignment="0" tabsequence=32766 border="0" color="0~tif(po_terminu = 1,rgb(255,0,0),0)" x="28" y="4" height="65" width="229" format="[general]"  name=subjekty_reference_subjektu edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
column(band=detail id=5 alignment="0" tabsequence=32766 border="0" color="0" x="1271" y="4" height="65" width="494" format="[general]"  name=vlastnik_nazev edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
column(band=detail id=3 alignment="0" tabsequence=32766 border="0" color="0" x="270" y="4" height="65" width="983" format="[general]"  name=subjekty_nazev_subjektu edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
compute(band=detail alignment="0" expression="if(datetime(today(),now()) > datum_ukonceni_plan,1,0)"border="0" color="0" x="3233" y="4" height="65" width="183" format="[general]"  name=po_terminu visible="1~t0"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
column(band=detail id=6 alignment="0" tabsequence=32766 border="0" color="0" x="1779" y="4" height="65" width="284" format="dd.mm.yyyy"  name=datum_porizeni edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
column(band=detail id=11 alignment="0" tabsequence=32766 border="0" color="0" x="2986" y="4" height="65" width="110" format="[general]"  name=kategorie_reklamace edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
column(band=detail id=9 alignment="0" tabsequence=32766 border="0" color="0" x="2076" y="4" height="65" width="439" format="dd.mm.yyyy hh:mm"  name=datum_zahajeni_plan edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
column(band=detail id=10 alignment="0" tabsequence=32766 border="0" color="0" x="2533" y="4" height="65" width="439" format="dd.mm.yyyy hh:mm"  name=datum_ukonceni_plan edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
compute(band=detail alignment="0" expression="daysafter(today(),date(datum_ukonceni_plan))"border="0" color="0" x="3109" y="4" height="65" width="106" format="[general]"  name=delta  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="536870912" )
line(band=summary x1="3246" y1="620" x2="5" y2="620" pen.style="0" pen.width="5" pen.color="0"  background.mode="1" background.color="553648127" )
text(band=summary alignment="1" text="Celkem hodin:"border="0" color="0" x="2295" y="640" height="69" width="343"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="553648127" )
compute(band=summary alignment="1" expression="/-* sum(ukol_pocet_hodin_plan for all) *-/"border="0" color="0" x="2684" y="640" height="85" width="270" format="###########0.00"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="553648127" )
compute(band=summary alignment="1" expression="/-* sum(ukol_pocet_hodin_realita for all) *-/"border="0" color="0" x="2972" y="640" height="85" width="270" format="###########0.00"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="-18" background.mode="1" background.color="553648127" )
 





$PBExportHeader$dw_sk_obec_tab_grp_utv.srd
release 6;
datawindow(units=0 timer_interval=0 color=16777215 processing=0 print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 97 print.margin.bottom = 97 print.paper.source = 0 print.paper.size = 0 print.prompt=no print.buttons=no print.preview.buttons=no )
header(height=316 color="536870912" )
summary(height=8 color="536870912" )
footer(height=8 color="536870912" )
detail(height=280 color="536870912"  height.autosize=yes)
table(column=(type=long updatewhereclause=yes name=sk_hlavicka_cislo_subjektu dbname="sk_hlavicka.cislo_subjektu" )
 column=(type=char(30) updatewhereclause=yes name=sk_refer dbname="sk_hlavicka.reference_subjektu" )
 column=(type=char(40) updatewhereclause=yes name=sk_hlavicka_nazev_subjektu dbname="sk_hlavicka.nazev_subjektu" )
 column=(type=char(1) updatewhereclause=yes name=typ dbname="sk_hlavicka.typ" )
 column=(type=long updatewhereclause=yes name=sk_hlavicka_utvar dbname="sk_hlavicka.utvar" )
 column=(type=char(30) updatewhereclause=yes name=organizace_reference_subjektu dbname="organizace.reference_subjektu" )
 column=(type=char(100) updatewhereclause=yes name=organizace_nazev_subjektu dbname="organizace.nazev_subjektu" )
 column=(type=char(20) updatewhereclause=yes name=organizace_ico dbname="organizace.ico" )
 column=(type=decimal(6) updatewhereclause=yes name=sk_pocet_celkem dbname="sk_hlavicka.pocet_celkem" )
 column=(type=datetime updatewhereclause=yes name=sk_hlavicka_datum dbname="sk_hlavicka.datum" )
 column=(type=datetime updatewhereclause=yes name=sk_hlavicka_datum_plan dbname="sk_hlavicka.datum_plan" )
 column=(type=decimal(4) updatewhereclause=yes name=sk_hlavicka_cena_celkem dbname="sk_hlavicka.cena_celkem" )
 column=(type=decimal(4) updatewhereclause=yes name=ccelkem_bez dbname="celkem_bez" )
 column=(type=decimal(4) updatewhereclause=yes name=sk_hlavicka_rabat_hlavicka dbname="sk_hlavicka.rabat_hlavicka" )
 column=(type=char(30) updatewhereclause=yes name=subjekty_a dbname="sk_hlavicka.a" )
 column=(type=char(30) updatewhereclause=yes name=subjekty_b dbname="sk_hlavicka.b" )
 column=(type=char(30) updatewhereclause=yes name=subjekty_c dbname="sk_hlavicka.c" )
 column=(type=char(40) updatewhereclause=yes name=subjekty_c_nazev dbname="sk_hlavicka.nazev_subjektu" )
 column=(type=char(30) updatewhereclause=yes name=subjekty_d dbname="sk_hlavicka.d" )
 column=(type=char(30) updatewhereclause=yes name=subjekty_e dbname="sk_hlavicka.e" )
 column=(type=char(40) updatewhereclause=yes name=subjekty_f dbname="sk_hlavicka.f" )
 column=(type=char(30) updatewhereclause=yes name=subjekty_g dbname="sk_hlavicka.g" )
 retrieve="  SELECT lcs.sk_hlavicka.cislo_subjektu,   
         lcs.sk_hlavicka.reference_subjektu,   
         lcs.sk_hlavicka.nazev_subjektu,   
         lcs.sk_hlavicka.typ,
         lcs.sk_hlavicka.utvar, 
         lcs.organizace.reference_subjektu,   
         lcs.organizace.nazev_subjektu,   
         lcs.organizace.ico,   
         lcs.sk_hlavicka.pocet_celkem,   
         lcs.sk_hlavicka.datum,   
         lcs.sk_hlavicka.datum_plan,   
         lcs.sk_hlavicka.cena_celkem,  
			isnull(lcs.sk_hlavicka.zaklad1,0)+isnull(lcs.sk_hlavicka.zaklad2,0)+isnull(lcs.sk_hlavicka.zaklad3,0) celkem_bez, 
         lcs.sk_hlavicka.rabat_hlavicka,   
         subjekty_a.reference_subjektu a, 
	    subjekty_b.reference_subjektu b,   
         subjekty_c.reference_subjektu c,   
	    subjekty_c.nazev_subjektu,   
         subjekty_d.reference_subjektu d,   
         subjekty_e.reference_subjektu e,   
         subjekty_f.nazev_subjektu f,
	    subjekty_g.reference_subjektu g 
    FROM lcs.sk_hlavicka,   
         lcs.organizace,   
         lcs.subjekty subjekty_a,   
         lcs.subjekty subjekty_b,   
         lcs.subjekty subjekty_c,   
         lcs.subjekty subjekty_d,   
         lcs.subjekty subjekty_e,   
         lcs.subjekty subjekty_f,  
	    lcs.subjekty subjekty_g
   WHERE ( lcs.organizace.cislo_subjektu =* lcs.sk_hlavicka.organizace) and  
         ( lcs.sk_hlavicka.obchodni_pripad *= subjekty_a.cislo_subjektu) and  
         ( lcs.sk_hlavicka.umisteni *= subjekty_b.cislo_subjektu) and  
         ( lcs.sk_hlavicka.utvar *= subjekty_c.cislo_subjektu) and  
         ( lcs.sk_hlavicka.typ_ceny *= subjekty_d.cislo_subjektu) and  
         ( lcs.sk_hlavicka.kontace *= subjekty_e.cislo_subjektu) and  
         ( lcs.sk_hlavicka.realizoval *= subjekty_f.cislo_subjektu) and
         ( lcs.sk_hlavicka.sklad *= subjekty_g.cislo_subjektu)  and
         ( lcs.sk_hlavicka.stav='1')  
    ORDER BY subjekty_c.reference_subjektu ASC, lcs.sk_hlavicka.datum ASC    
" )
group(level=1 header.height=216 trailer.height=340 by=("sk_hlavicka_utvar" ) header.color="536870912" trailer.color="536870912" )
compute(band=header alignment="0" expression="'Strana ' + page() + ' z ' + pageCount()"border="0" color="0" x="41" y="24" height="72" width="590" format="[general]"  font.face="Times New Roman CE" font.height="-11" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=header alignment="1" expression="'Datum '+today()"border="0" color="0" x="2345" y="16" height="72" width="891" format="[general]"  font.face="Times New Roman CE" font.height="-11" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="1" text="IČO:"border="0" color="0" x="1408" y="236" height="64" width="110"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=header alignment="0" expression="fg_org_vlast_ico()"border="0" color="0" x="1545" y="236" height="64" width="357" format="[general]"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=header alignment="0" expression="fg_org_vlast_nazev()"border="0" color="0" x="329" y="236" height="68" width="987" format="[general]"  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=header alignment="0" expression="if (((typ='1') or (typ='3')) , 'Odběratel:', 'Dodavatel:') "border="0" color="0" x="27" y="236" height="64" width="270" format="[general]"  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=header alignment="0" expression="case( typ when '1' then 'Příjemky zboží' when '2' then 'Výdejky zboží' when '3' then 'Objednávky zboží' when '4' then 'Zákaznické objednávky' when '5' then 'Potvrzené objednávky zboží' when '6' then 'Rezervace zboží'  when 'T' then 'Průběžky zboží' when 'S' then 'Soupisky zboží')"border="0" color="0" x="667" y="88" height="108" width="1664" format="[general]"  font.face="Times New Roman CE" font.height="-18" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="Organizace - "border="4" color="0" x="293" y="140" height="64" width="631"  name=organizace_nazev_subjektu_t  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
roundrectangle(band=header.1 ellipseheight="60" ellipsewidth="69"x="18" y="4" height="112" width="1595" brush.hatch="6" brush.color="16777215" pen.style="0" pen.width="9" pen.color="0"  background.mode="2" background.color="0" )
text(band=header.1 alignment="0" text="Útvar:"border="4" color="0" x="55" y="24" height="64" width="160"  name=subjekty_c_t  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.1 id=18 alignment="0" tabsequence=32766 border="0" color="0" x="631" y="24" height="64" width="919" format="[general]"  name=subjekty_c_nazev edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.1 id=17 alignment="0" tabsequence=32766 border="0" color="0" x="242" y="24" height="64" width="347" format="[general]"  name=subjekty_c edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="Kontace:"border="4" color="0" x="2565" y="140" height="64" width="302"  name=subjekty_e_t  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="Rabat:"border="4" color="0" x="2962" y="140" height="64" width="169"  name=sk_hlavicka_rabat_hlavicka_t  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="Realizoval:"border="4" color="0" x="2158" y="140" height="64" width="283"  name=subjekty_f_t  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="Číslo:"border="4" color="0" x="992" y="140" height="64" width="160"  name=organizace_reference_subjektu_t  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="1" text="IČO:"border="4" color="0" x="1307" y="140" height="64" width="133"  name=organizace_ico_t  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="Sklad:"border="4" color="0" x="1641" y="140" height="64" width="174"  name=subjekty_g_t  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="Zakázka:"border="4" color="0" x="1879" y="140" height="64" width="247"  name=subjekty_a_t  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="Doklad:"border="4" color="0" x="23" y="140" height="64" width="206"  name=sk_refer_t  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=header.1 alignment="0" expression="if (((typ='1') or (typ='3')) , 'Dodavatel:', 'Odběratel:')"border="4" color="0" x="635" y="140" height="64" width="288" format="[general]"  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=detail x1="27" y1="272" x2="3264" y2="272" pen.style="0" pen.width="5" pen.color="0"  background.mode="1" background.color="536870912" )
column(band=detail id=19 alignment="1" tabsequence=32766 border="0" color="0" x="581" y="188" height="64" width="247" format="[general]"  name=subjekty_d edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=9 alignment="1" tabsequence=32766 border="0" color="0" x="581" y="108" height="64" width="247" format="###############0.0#####"  name=sk_pocet_celkem edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=7 alignment="0" tabsequence=32766 border="0" color="0" x="293" y="12" height="64" width="658" format="[general]"  name=organizace_nazev_subjektu edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=2 alignment="0" tabsequence=32766 border="0" color="0" x="23" y="12" height="64" width="233" format="[general]"  name=sk_refer edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=14 alignment="1" tabsequence=32766 border="0" color="0" x="2930" y="12" height="64" width="192" format="[general]"  name=sk_hlavicka_rabat_hlavicka edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=20 alignment="0" tabsequence=32766 border="0" color="0" x="2565" y="12" height="64" width="311" format="[general]"  name=subjekty_e edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=21 alignment="0" tabsequence=32766 border="0" color="0" x="2158" y="12" height="64" width="370" format="[general]"  name=subjekty_f edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=8 alignment="0" tabsequence=32766 border="0" color="0" x="1321" y="12" height="64" width="274" format="[general]"  name=organizace_ico edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=22 alignment="0" tabsequence=32766 border="0" color="0" x="1641" y="12" height="64" width="160" format="[general]"  name=subjekty_g edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=6 alignment="0" tabsequence=32766 border="0" color="0" x="992" y="12" height="64" width="293" format="[general]"  name=organizace_reference_subjektu edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=15 alignment="0" tabsequence=32766 border="0" color="0" x="1879" y="12" height="64" width="238" format="[general]"  name=subjekty_a edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=12 alignment="1" tabsequence=32766 border="0" color="0" x="1093" y="188" height="64" width="430" format="##,###,###,##0.00"  name=sk_hlavicka_cena_celkem edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=13 alignment="1" tabsequence=32766 border="0" color="0" x="1093" y="108" height="64" width="430" format="##,###,###,##0.00"  name=ccelkem_bez edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=16 alignment="0" tabsequence=32766 border="0" color="0" x="1861" y="108" height="64" width="462" format="[general]"  name=subjekty_b edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Umístění:"border="4" color="0" x="1536" y="108" height="64" width="306"  name=subjekty_b_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=10 alignment="0" tabsequence=32766 border="0" color="0" x="2866" y="108" height="64" width="302" format="dd.mm.yyyy"  name=sk_hlavicka_datum edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=11 alignment="0" tabsequence=32766 border="0" color="0" x="2866" y="188" height="64" width="302" format="dd.mm.yyyy"  name=sk_hlavicka_datum_plan edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Typ ceny:"border="4" color="0" x="311" y="188" height="64" width="242"  name=subjekty_d_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Množství:"border="4" color="0" x="311" y="108" height="64" width="242"  name=sk_pocet_celkem_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Celkem:"border="4" color="0" x="837" y="188" height="64" width="242"  name=sk_hlavicka_cena_celkem_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Základ:"border="4" color="0" x="837" y="108" height="64" width="242"  name=ccelkem_bez_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Plánované datum:"border="4" color="0" x="2341" y="188" height="64" width="503"  name=sk_hlavicka_datum_plan_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Datum vyst.- real:"border="4" color="0" x="2341" y="108" height="64" width="503"  name=sk_hlavicka_datum_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=trailer.1 x1="27" y1="8" x2="3259" y2="8" pen.style="0" pen.width="14" pen.color="0"  background.mode="1" background.color="553648127" )
text(band=trailer.1 alignment="1" text="Počet dokladů:"border="0" color="0" x="23" y="32" height="64" width="407"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="0" expression="count(  sk_refer  for group 1 )"border="0" color="0" x="453" y="32" height="64" width="151" format="[general]"  name=pocet_dokladu  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=trailer.1 alignment="1" text="Suma množství:"border="0" color="0" x="622" y="32" height="64" width="448"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="0" expression="sum(  sk_pocet_celkem  for group 1 )"border="0" color="0" x="1088" y="32" height="64" width="279" format="[general]"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=trailer.1 alignment="1" text="Suma základu:"border="0" color="0" x="1381" y="32" height="64" width="466"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="0" expression="sum(ccelkem_bez for group 1)"border="0" color="0" x="1870" y="32" height="64" width="430" format="##,###,###,##0.00"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=trailer.1 alignment="1" text="Suma celková:"border="0" color="0" x="2318" y="32" height="64" width="357"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="0" expression="sum(sk_hlavicka_cena_celkem for group 1)"border="0" color="0" x="2693" y="32" height="64" width="430" format="##,###,###,##0.00"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
htmltable(border="1" cellpadding="0" cellspacing="0" generatecss="no" nowrap="yes") 











$PBExportHeader$dw_sk_polozky_bez_tab.srd
release 7;
datawindow(units=0 timer_interval=0 color=12632256 processing=1 HTMLDW=no print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 97 print.margin.bottom = 97 print.paper.source = 0 print.paper.size = 0 print.prompt=no print.buttons=no print.preview.buttons=no grid.lines=0 selected.mouse=no )
header(height=76 color="-1" )
summary(height=0 color="-1" )
footer(height=0 color="-1" )
detail(height=80 color="-1" )
table(column=(type=long updatewhereclause=yes name=cislo_subjektu dbname="sk_hlavicka.cislo_subjektu" )
 column=(type=long updatewhereclause=yes identity=yes name=cislo_objektu dbname="sk_polozka.cislo_objektu" )
 column=(type=long updatewhereclause=yes name=cislo_radky dbname="sk_polozka.cislo_radky" )
 column=(type=char(30) updatewhereclause=yes name=subjekty_reference_subjektu dbname="sk_hlavicka.reference_subjektu" )
 column=(type=long updatewhereclause=yes name=zdroj dbname="sk_polozka.zdroj" )
 column=(type=char(30) updatewhereclause=yes name=zdroj_refer dbname="sk_hlavicka.reference_subjektu" )
 column=(type=char(40) updatewhereclause=yes name=zdroj_nazev dbname="sk_hlavicka.nazev_subjektu" )
 column=(type=long updatewhereclause=yes name=sklad dbname="sk_polozka.sklad" )
 column=(type=char(30) updatewhereclause=yes name=sklad_refer dbname="sk_hlavicka.reference_subjektu" )
 column=(type=char(1) updatewhereclause=yes name=typ dbname="sk_polozka.typ" values="Příjemka	1/Výdejka	2/Objednávka	3/Poptávka	4/Potvrzená objednávka	5/Rezervace	6/Oceňovací odchylka	7/Rozpouštění odchylky	8/Inventura	0/Průběžka	T/Soupiska	S/" )
 column=(type=char(1) updatewhereclause=yes name=stav dbname="sk_polozka.stav" values="Zavedeno	0/Realizováno	1/" )
 column=(type=datetime updatewhereclause=yes name=datum dbname="sk_hlavicka.datum" )
 column=(type=long updatewhereclause=yes name=organizace dbname="sk_polozka.organizace" )
 column=(type=char(40) updatewhereclause=yes name=organizace_nazev dbname="sk_hlavicka.nazev_subjektu" )
 column=(type=datetime updatewhereclause=yes name=datum_plan dbname="sk_polozka.datum_plan" )
 column=(type=char(1) updatewhereclause=yes name=stornovano dbname="sk_polozka.stornovano" values="	A/	N" )
 column=(type=decimal(4) updatewhereclause=yes name=cena_jedn dbname="sk_polozka.cena_jedn" )
 column=(type=decimal(4) updatewhereclause=yes name=cena_zaklad dbname="sk_polozka.cena_zaklad" )
 column=(type=decimal(4) updatewhereclause=yes name=cena_evid_jedn dbname="sk_polozka.cena_evid_jedn" )
 column=(type=decimal(4) updatewhereclause=yes name=cena_evid_celkem dbname="sk_polozka.cena_evid_celkem" )
 column=(type=char(1) updatewhereclause=yes name=korekce dbname="sk_polozka.korekce" values="	A/	N" )
 column=(type=decimal(6) updatewhereclause=yes name=pocet dbname="sk_polozka.pocet" )
 column=(type=decimal(6) updatewhereclause=yes name=pocet_real dbname="sk_polozka.pocet_real" )
 column=(type=decimal(6) updatewhereclause=yes name=compute_0024 dbname="compute_0024" )
 column=(type=char(1) updatewhereclause=yes name=splneno dbname="sk_polozka.splneno" )
 column=(type=char(30) updatewhereclause=yes name=organizace_refer dbname="sk_hlavicka.reference_subjektu" )
 column=(type=long updatewhereclause=yes name=pohyb dbname="sk_polozka.pohyb" )
 column=(type=char(30) updatewhereclause=yes name=pohyb_refer dbname="sk_hlavicka.pohyb_refer" )
 column=(type=decimal(6) updatewhereclause=yes name=pocet_kontrola dbname="sk_polozka.pocet_kontrola" )
 column=(type=char(1) updatewhereclause=yes name=financni_doklad dbname="sk_polozka.financni_doklad" values=" 	A/ 	N" )
 retrieve="SELECT 
 	lcs.sk_hlavicka.cislo_subjektu,
 	lcs.sk_polozka.cislo_objektu,
 	lcs.sk_polozka.cislo_radky, 
 	lcs.sk_hlavicka.reference_subjektu,
 	lcs.sk_polozka.zdroj, 
 	subjekty_a.reference_subjektu, 
 	subjekty_a.nazev_subjektu, 
 	lcs.sk_polozka.sklad, 
 	subjekty_b.reference_subjektu, 
 	lcs.sk_polozka.typ, 
 	lcs.sk_polozka.stav, 
 	lcs.sk_hlavicka.datum, 
 	lcs.sk_polozka.organizace, 
 	subjekty_c.nazev_subjektu, 
 	lcs.sk_polozka.datum_plan, 
 	lcs.sk_polozka.stornovano, 
 	lcs.sk_polozka.cena_jedn, 
 	lcs.sk_polozka.cena_zaklad, 
 	lcs.sk_polozka.cena_evid_jedn, 
 	lcs.sk_polozka.cena_evid_celkem, 
 	lcs.sk_polozka.korekce, 
 	lcs.sk_polozka.pocet,
 	lcs.sk_polozka.pocet_real,
 	(case lcs.sk_polozka.splneno when 'A' then 0 else lcs.sk_polozka.pocet-lcs.sk_polozka.pocet_real end ), 
 	lcs.sk_polozka.splneno, 
 	subjekty_c.reference_subjektu, 
 	lcs.sk_polozka.pohyb,
 	subjekty_d.reference_subjektu pohyb_refer,
	lcs.sk_polozka.pocet_kontrola,  
 	lcs.sk_polozka.financni_doklad 
 FROM 
 	lcs.sk_hlavicka, 
 	lcs.sk_polozka, 
 	lcs.subjekty subjekty_a, 
 	lcs.subjekty subjekty_b, 
 	lcs.subjekty subjekty_c,
 	lcs.subjekty subjekty_d
 WHERE lcs.sk_hlavicka.cislo_subjektu = lcs.sk_polozka.cislo_subjektu and 
  	lcs.sk_polozka.zdroj *= subjekty_a.cislo_subjektu and 
 	lcs.sk_polozka.sklad *= subjekty_b.cislo_subjektu and 
 	lcs.sk_polozka.organizace *= subjekty_c.cislo_subjektu and
 	lcs.sk_polozka.pohyb *= subjekty_d.cislo_subjektu  
ORDER BY
 	lcs.sk_hlavicka.reference_subjektu DESC 
" retrieve.asneeded=yes )
text(band=header alignment="2" text="Doklad" border="6" color="0" x="9" y="8" height="64" width="283"  name=subjekty_reference_subjektu_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" font.underline="1" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="S" border="6" color="0" x="302" y="8" height="64" width="59"  name=stornovano_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="K" border="6" color="0" x="370" y="8" height="64" width="59"  name=korekce_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Finanční doklad" border="6" color="0" x="439" y="8" height="64" width="87"  name=financni_doklad_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="Datum" border="6" color="0" x="535" y="8" height="64" width="352"  name=datum_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="Typ" border="6" color="0" x="896" y="8" height="64" width="329"  name=typ_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Stav" border="6" color="0" x="1234" y="8" height="64" width="197"  name=stav_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="ř." border="6" color="0" x="1440" y="8" height="64" width="73"  name=cislo_radky_t  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Č. zboží" border="6" color="0" x="1522" y="8" height="64" width="293"  name=zdroj_refer_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" font.underline="1" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Zboží" border="6" color="0" x="1824" y="8" height="64" width="366"  name=zdroj_nazev_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" font.underline="1" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Množství" border="6" color="0" x="2199" y="8" height="64" width="279"  name=pocet_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="Splněno" border="6" color="0" x="2487" y="8" height="64" width="261"  name=pocet_real_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
text(band=header alignment="0" text="Vyř" border="6" color="0" x="2757" y="8" height="64" width="101"  name=splneno_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Organizace" border="6" color="0" x="2866" y="8" height="64" width="357"  name=organizace_nazev_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" font.underline="1" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Č. org." border="6" color="0" x="3232" y="8" height="64" width="256"  name=organizace_refer_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" font.underline="1" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Sklad" border="6" color="0" x="3497" y="8" height="64" width="210"  name=sklad_refer_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" font.underline="1" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Datum plán" border="6" color="0" x="3717" y="8" height="64" width="352"  name=datum_plan_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Kontrola" border="6" color="0" x="4078" y="8" height="64" width="133"  name=pocet_kontrola_t  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="Jedn. cena" border="6" color="0" x="4219" y="8" height="64" width="325"  name=cena_jedn_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Cena základ" border="6" color="0" x="4553" y="8" height="64" width="389"  name=cena_zaklad_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="Jedn. evid. cena" border="6" color="0" x="4951" y="8" height="64" width="439"  name=cena_evid_jedn_t  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Celk. evid. cena" border="6" color="0" x="5399" y="8" height="64" width="434"  name=cena_evid_celkem_t  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Podklad" border="6" color="0" x="5842" y="8" height="64" width="261"  name=pohyb_refer_t  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=6 alignment="0" tabsequence=32766 border="0" color="0" x="1522" y="8" height="68" width="293" format="[general]"  name=zdroj_refer edit.limit=30 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=11 alignment="0" tabsequence=32766 border="0" color="0" x="1234" y="8" height="68" width="197" format="[general]"  name=stav edit.name="typ_sk_pohyb_stav" ddlb.limit=0 ddlb.allowedit=no ddlb.case=any  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=9 alignment="0" tabsequence=32766 border="0" color="0" x="3497" y="8" height="68" width="210" format="[general]"  name=sklad_refer edit.limit=30 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=15 alignment="1" tabsequence=32766 border="0" color="0" x="3717" y="8" height="68" width="352" format="dd.mm.yyyy"  name=datum_plan edit.name="datum" editmask.autoskip=yes editmask.mask="dd.mm.yyyy" editmask.focusrectangle=no  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=16 alignment="0" tabsequence=32766 border="0" color="0" x="302" y="8" height="68" width="59" format="[general]"  name=stornovano edit.name="switchA/N" checkbox.text="" checkbox.on="A" checkbox.off="N" checkbox.lefttext=yes checkbox.scale=no checkbox.threed=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=21 alignment="0" tabsequence=32766 border="0" color="0" x="370" y="8" height="68" width="59" format="[general]"  name=korekce edit.name="switchA/N" checkbox.text="" checkbox.on="A" checkbox.off="N" checkbox.lefttext=yes checkbox.scale=no checkbox.threed=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=20 alignment="1" tabsequence=32766 border="0" color="0" x="5399" y="8" height="68" width="434" format="##,###,###,##0.00"  name=cena_evid_celkem edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=22 alignment="1" tabsequence=32766 border="0" color="0" x="2199" y="8" height="68" width="279" format="############0.0#####"  name=pocet edit.limit=0 edit.case=any edit.autoselect=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=23 alignment="1" tabsequence=32766 border="0" color="0" x="2487" y="8" height="68" width="261" format="############0.0#####"  name=pocet_real edit.limit=0 edit.case=any edit.autoselect=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=3 alignment="1" tabsequence=32766 border="0" color="0" x="1440" y="8" height="68" width="73" format="[general]"  name=cislo_radky edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=4 alignment="0" tabsequence=32766 border="0" color="0" x="9" y="8" height="68" width="283" format="[general]"  name=subjekty_reference_subjektu edit.limit=30 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=10 alignment="0" tabsequence=32766 border="0" color="0" x="896" y="8" height="68" width="329" format="[general]"  name=typ edit.name="typ_sk_pohyb" ddlb.limit=0 ddlb.allowedit=no ddlb.case=any  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
column(band=detail id=7 alignment="0" tabsequence=32766 border="0" color="0" x="1824" y="8" height="68" width="366" format="[general]"  name=zdroj_nazev edit.limit=40 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=17 alignment="1" tabsequence=32766 border="0" color="0" x="4219" y="8" height="68" width="325" format="##,###,###,##0.0000"  name=cena_jedn edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=19 alignment="1" tabsequence=32766 border="0" color="0" x="4951" y="8" height="68" width="439" format="##,###,###,##0.0000"  name=cena_evid_jedn edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=25 alignment="0" tabsequence=32766 border="0" color="0" x="2757" y="8" height="68" width="101" format="[general]"  name=splneno edit.limit=0 edit.case=any edit.autoselect=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=14 alignment="0" tabsequence=32766 border="0" color="0" x="2866" y="8" height="68" width="357" format="[general]"  name=organizace_nazev edit.limit=40 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=26 alignment="0" tabsequence=32766 border="0" color="0" x="3232" y="8" height="68" width="256" format="[general]"  name=organizace_refer edit.limit=0 edit.case=any edit.autoselect=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=18 alignment="1" tabsequence=32766 border="0" color="0" x="4553" y="8" height="64" width="389" format="##,###,###,##0.00"  name=cena_zaklad edit.limit=0 edit.case=any edit.autoselect=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=28 alignment="0" tabsequence=32766 border="0" color="0" x="5842" y="8" height="68" width="261" format="[general]"  name=pohyb_refer edit.limit=0 edit.case=any edit.autoselect=yes  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=29 alignment="1" tabsequence=32766 border="0" color="0" x="4078" y="8" height="68" width="133" format="###########0.######"  name=pocet_kontrola edit.limit=0 edit.case=any edit.autoselect=yes  font.face="MS Sans Serif" font.height="-10" font.weight="400~tif (pocet<>if (isnull(pocet_kontrola), 0, pocet_kontrola), 700, 400)"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=12 alignment="0" tabsequence=32766 border="0" color="0" x="535" y="8" height="68" width="352" format="dd.mm.yyyy"  name=datum accelerator=" " edit.name="datum" editmask.autoskip=yes editmask.mask="dd.mm.yyyy" editmask.focusrectangle=no  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
column(band=detail id=30 alignment="0" tabsequence=32766 border="0" color="0" x="439" y="8" height="64" width="87" format="[general]"  name=financni_doklad edit.name="switchA/N" checkbox.text=" " checkbox.on="A" checkbox.off="N" checkbox.lefttext=yes checkbox.scale=no checkbox.threed=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" )
 





$PBExportHeader$dw_altern_component_tab.srd
release 7;
datawindow(units=0 timer_interval=0 color=16777215 processing=0 HTMLDW=no print.documentname="" print.orientation = 1 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.prompt=no print.buttons=no print.preview.buttons=no )
header(height=356 color="536870912" )
summary(height=12 color="536870912" )
footer(height=0 color="536870912" )
detail(height=88 color="536870912" )
table(column=(type=long updatewhereclause=yes name=dil_cislo_subjektu dbname="dil_cislo_subjektu" )
 column=(type=char(30) updatewhereclause=yes name=dil_reference_subjektu dbname="dil_reference_subjektu" )
 column=(type=char(40) updatewhereclause=yes name=dil_nazev_subjektu dbname="dil_nazev_subjektu" )
 column=(type=long updatewhereclause=yes name=kom_cislo_subjektu dbname="kom_cislo_subjektu" )
 column=(type=char(30) updatewhereclause=yes name=kom_reference_subjektu dbname="kom_reference_subjektu" )
 column=(type=char(40) updatewhereclause=yes name=kom_nazev_subjektu dbname="kom_nazev_subjektu" )
 column=(type=long updatewhereclause=yes name=alt_cislo_subjektu dbname="alt_cislo_subjektu" )
 column=(type=char(30) updatewhereclause=yes name=typ_altern dbname="alt_reference_subjektu" )
 column=(type=char(40) updatewhereclause=yes name=alt_nazev_subjektu dbname="alt_nazev_subjektu" )
 column=(type=long updatewhereclause=yes name=cnt_altern dbname="cnt_altern" )
 column=(type=char(1) updatewhereclause=yes name=typ_altern dbname="typ_altern" )
 column=(type=long updatewhereclause=yes name=alt_used_here dbname="alt_used_here" )
 retrieve="EXEC lcs.nsp_mfr_get_altern_comp @constrElement = :ra_cs" arguments=(("ra_cs", number)) )
group(level=1 header.height=80 trailer.height=12 by=("dil_cislo_subjektu" ) header.color="536870912" trailer.color="536870912" )
text(band=header alignment="2" text="Alternativní komponenty TPV" border="0" color="0" x="1129" y="36" height="92" width="2048"  name=t_4  font.face="Arial CE" font.height="-14" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
text(band=header alignment="0" text="Datum:" border="0" color="0" x="3954" y="48" height="60" width="174"  name=t_1  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
compute(band=header alignment="1" expression="today()"border="0" color="0" x="4146" y="48" height="72" width="325" format="dd.mm.yyyy"  name=compute_2  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
compute(band=header alignment="1" expression="'Strana ' + page() + ' z ' + pageCount()"border="0" color="0" x="3881" y="140" height="72" width="590" format="[general]"  name=compute_3  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
text(band=header alignment="0" text="Název dílce" border="0" color="0" x="526" y="276" height="56" width="581"  name=dil_nazev_subjektu_t  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=header x1="41" y1="352" x2="4480" y2="352"  name=l_1 pen.style="0" pen.width="5" pen.color="0"  background.mode="2" background.color="16777215" )
text(band=header alignment="0" text="Reference" border="0" color="0" x="50" y="276" height="60" width="430"  name=dil_reference_subjektu_t  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.1 id=3 alignment="0" tabsequence=32766 border="0" color="0" x="526" y="4" height="76" width="1870" format="[general]"  name=dil_nazev_subjektu edit.limit=40 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.1 id=2 alignment="0" tabsequence=32766 border="0" color="0" x="50" y="4" height="76" width="448" format="[general]"  name=dil_reference_subjektu edit.limit=30 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=12 alignment="2" tabsequence=32766 border="0" color="0" x="4256" y="8" height="76" width="210" format="[general]~tif(  alt_used_here > 0 , ~"ANO~", ~"! NE !~" )"  name=alt_used_here edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=11 alignment="0" tabsequence=32766 border="0" color="0" x="4133" y="8" height="76" width="64" format="[general]"  name=typ_altern edit.limit=30 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
rectangle(band=detail x="4256" y="0" height="80" width="219"  name=ramec1 visible="1~tif( alt_used_here = 0, 1, 0)"  slideup=allabove brush.hatch="7" brush.color="553582847" pen.style="0" pen.width="9" pen.color="0"  background.mode="2" background.color="16777215" )
column(band=detail id=8 alignment="0" tabsequence=32766 border="0" color="0" x="2583" y="8" height="76" width="471" format="[general]"  name=alt_reference_subjektu edit.limit=30 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=9 alignment="0" tabsequence=32766 border="0" color="0" x="3067" y="8" height="76" width="855" format="[general]"  name=alt_nazev_subjektu edit.limit=40 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=10 alignment="1" tabsequence=32766 border="0" color="0" x="3895" y="8" height="76" width="201" format="[general]"  name=cnt_altern edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=5 alignment="0" tabsequence=32766 border="0" color="0" x="1115" y="8" height="76" width="539" format="[general]"  name=kom_reference_subjektu edit.limit=30 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=6 alignment="0" tabsequence=32766 border="0" color="0" x="1673" y="8" height="76" width="882" format="[general]"  name=kom_nazev_subjektu edit.limit=40 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=trailer.1 x1="41" y1="0" x2="4480" y2="0"  name=l_4 pen.style="0" pen.width="5" pen.color="0"  background.mode="2" background.color="16777215" )
line(band=summary x1="41" y1="0" x2="4480" y2="0"  name=l_5 pen.style="0" pen.width="5" pen.color="0"  background.mode="2" background.color="16777215" )
compute(band=footer alignment="0" expression="today()"border="0" color="0" x="1042" y="164" height="68" width="283" format="[general]"  name=date_1  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=header x1="41" y1="256" x2="4480" y2="256"  name=l_3 pen.style="0" pen.width="5" pen.color="0"  background.mode="2" background.color="16777215" )
line(band=header x1="41" y1="244" x2="4480" y2="244"  name=l_2 pen.style="0" pen.width="5" pen.color="0"  background.mode="2" background.color="16777215" )
text(band=header alignment="0" text="Položka kusovníku" border="0" color="0" x="1125" y="276" height="56" width="517"  name=kom_reference_subjektu_t  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Název" border="0" color="0" x="1673" y="276" height="56" width="686"  name=kom_nazev_subjektu_t  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Alternativa" border="0" color="0" x="2610" y="276" height="56" width="329"  name=alt_reference_subjektu_t  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Název" border="0" color="0" x="3072" y="276" height="56" width="622"  name=alt_nazev_subjektu_t  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="1" text="Použita zde" border="0" color="0" x="4142" y="276" height="56" width="334"  name=alt_used_here_t  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="1" text="Poèet výskytù" border="0" color="0" x="3698" y="276" height="56" width="393"  name=cnt_altern_t  font.face="Arial CE" font.height="-9" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" )
 
 
 
 
 
 
 
 
 
$PBExportHeader$dw_pruvodka_vp_s_komp_form.srd
release 7;
datawindow(units=0 timer_interval=0 color=16777215 processing=0 HTMLDW=no print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.prompt=no print.buttons=no print.preview.buttons=no )
summary(height=0 color="536870912" )
footer(height=0 color="536870912" )
detail(height=80 color="536870912" )
table(column=(type=long updatewhereclause=yes name=product_order_cislo_subjektu dbname="cislo_subjektu" )
 column=(type=char(30) updatewhereclause=yes name=product_order_refer dbname="refer" )
 column=(type=char(30) updatewhereclause=yes name=kk_kk_refer dbname="kk_refer" )
 column=(type=char(80) updatewhereclause=yes name=kk_kk_nazev dbname="kk_nazev" )
 column=(type=char(40) updatewhereclause=yes name=kk_kk_nazev2 dbname="kk_nazev2" )
 column=(type=char(40) updatewhereclause=yes name=kk_kk_nazev3 dbname="kk_nazev3" )
 column=(type=char(30) updatewhereclause=yes name=varianta_varianta_refer dbname="varianta_refer" )
 column=(type=char(30) updatewhereclause=yes name=zakazka_zakazka_refer dbname="zakazka_refer" )
 column=(type=char(30) updatewhereclause=yes name=utvar_utvar_refer dbname="utvar_refer" )
 column=(type=decimal(6) updatewhereclause=yes name=product_order_mnozstvi dbname="mnozstvi" )
 column=(type=char(30) updatewhereclause=yes name=mj_mj_refer dbname="mj_refer" )
 column=(type=char(30) updatewhereclause=yes name=sklad_odvedeni_sklad_odvedeni dbname="sklad_odvedeni" values="POLOTOVARY	-/HOTOVCI	H/KOOP	X/" )
 column=(type=datetime updatewhereclause=yes name=product_order_datum dbname="datum" )
 column=(type=datetime updatewhereclause=yes name=product_order_datum_end dbname="datum_end" )
 column=(type=long updatewhereclause=yes name=op_op_line dbname="op_line" )
 column=(type=char(40) updatewhereclause=yes name=op_op_nazev dbname="op_nazev" )
 column=(type=char(40) updatewhereclause=yes name=prac_op_pracoviste_nazev dbname="op_pracoviste_nazev" )
 column=(type=decimal(6) updatewhereclause=yes name=op_op_cas dbname="op_cas" )
 column=(type=long updatewhereclause=yes identity=yes name=op_op_nonsubjekt dbname="op_nonsubjekt" )
 column=(type=long updatewhereclause=yes name=kus_kus_line dbname="kus_line" )
 column=(type=char(30) updatewhereclause=yes name=komp_komp_reference dbname="komp_reference" )
 column=(type=char(80) updatewhereclause=yes name=komp_komp_nazev dbname="komp_nazev" )
 column=(type=decimal(18) updatewhereclause=yes name=kus_qty dbname="qty" )
 column=(type=char(30) updatewhereclause=yes name=mj_komp_komp_mj_refer dbname="komp_mj_refer" )
 column=(type=char(30) updatewhereclause=yes name=sklad_kus_skald_kus_refer dbname="skald_kus_refer" )
 column=(type=char(1) updatewhereclause=yes name=prefix dbname="prefix" values="POLOTOVARY	-/HOTOVCI	H/KOOP	X/" )
 column=(type=decimal(6) updatewhereclause=yes name=qty_for_po dbname="qty_for_po" )
 column=(type=char(3) updatewhereclause=yes name=dodavatel_ref dbname="dodavatel_ref" )
 column=(type=char(100) updatewhereclause=yes name=organizace_nazev dbname="organizace_nazev" )
 column=(type=char(40) updatewhereclause=yes name=zakazka_nazev dbname="zakazka_nazev" )
 column=(type=decimal(6) updatewhereclause=yes name=qty_remain dbname="qty_remain" )
 column=(type=char(32766) updatewhereclause=no name=org_poznamka dbname="org_poznamka" )
 column=(type=char(512) updatewhereclause=yes name=note dbname="note" )
 retrieve="SELECT 
lcs.product_order.cislo_subjektu,
lcs.product_order.reference_subjektu refer,
kk.reference_subjektu kk_refer,
kk.nazev_subjektu kk_nazev,
kk.alternativni_nazev2 kk_nazev2,
kk.alternativni_nazev3 kk_nazev3,
varianta.reference_subjektu varianta_refer,
zakazka.reference_subjektu zakazka_refer,
utvar.reference_subjektu utvar_refer,
lcs.product_order.qty mnozstvi,
mj.reference_subjektu mj_refer,
sklad_odvedeni.reference_subjektu sklad_odvedeni,
lcs.product_order.date_doc datum,
lcs.product_order.date_end_plan datum_end,
op.line op_line,
op.op_name op_nazev,
prac.nazev_subjektu op_pracoviste_nazev,
op.time_oper*60 op_cas,
op.cislo_nonsubjektu op_nonsubjekt,
kus.line kus_line,
komp.reference_subjektu komp_reference,
komp.nazev_subjektu komp_nazev,
(kus.qty / lcs.product_order.qty_source) qty,
mj_komp.reference_subjektu komp_mj_refer,
sklad_kus.reference_subjektu skald_kus_refer,
substring(lcs.product_order.reference_subjektu,3,1) as prefix,
(kus.qty ) as qty_for_po,
substring(dodavatel_sub.reference_subjektu,1,3) as dodavatel_ref,
org.nazev_subjektu organizace_nazev,
zakazka.nazev_subjektu zakazka_nazev,
(kus.qty - kus.qty_real) qty_remain,
org.poznamka org_poznamka,
lcs.product_order.note
FROM lcs.product_order 
LEFT OUTER JOIN lcs.kmenova_karta_skladu kk ON kk.cislo_subjektu = lcs.product_order.source
LEFT OUTER JOIN lcs.subjekty mj ON mj.cislo_subjektu = kk.merna_jednotka
LEFT OUTER JOIN lcs.subjekty varianta ON varianta.cislo_subjektu = lcs.product_order.variation
LEFT OUTER JOIN lcs.subjekty zakazka ON zakazka.cislo_subjektu = lcs.product_order.order_relation
LEFT OUTER JOIN lcs.subjekty utvar ON utvar.cislo_subjektu = lcs.product_order.department
LEFT OUTER JOIN lcs.subjekty sklad_odvedeni ON sklad_odvedeni.cislo_subjektu = lcs.product_order.stock
LEFT OUTER JOIN lcs.product_order_operation op ON op.product_order = lcs.product_order.cislo_subjektu
LEFT OUTER JOIN lcs.subjekty prac ON prac.cislo_subjektu = op.workplace
LEFT OUTER JOIN lcs.product_order_structure kus ON kus.operation_po = op.cislo_nonsubjektu and kus.product_order = lcs.product_order.cislo_subjektu
LEFT OUTER JOIN lcs.kmenova_karta_skladu komp ON komp.cislo_subjektu = kus.source
LEFT OUTER JOIN lcs.subjekty mj_komp ON mj_komp.cislo_subjektu = komp.merna_jednotka
LEFT OUTER JOIN lcs.subjekty sklad_kus ON sklad_kus.cislo_subjektu = kus.stock
LEFT OUTER JOIN lcs.stav_sk stav ON stav.zdroj = kus.source AND stav.sklad = kus.stock
LEFT OUTER JOIN lcs.subjekty dodavatel_sub ON dodavatel_sub.cislo_subjektu = stav.aktualni_dodavatel
LEFT OUTER JOIN lcs.vztahysubjektu vzs1 ON vzs1.cislo_subjektu = lcs.product_order.cislo_subjektu AND vzs1.cislo_vztahu = 100083
LEFT OUTER JOIN lcs.organizace org ON org.cislo_subjektu = vzs1.cislo_vztaz_subjektu
WHERE lcs.product_order.cislo_subjektu =  :cislo_subjektu
ORDER BY lcs.product_order.reference_subjektu, op.line, skald_kus_refer desc, komp_reference" arguments=(("cislo_subjektu", number)) )
group(level=1 header.height=676 trailer.height=568 by=("product_order_cislo_subjektu" ) newpage=yes header.color="536870912" trailer.color="536870912" )
group(level=2 header.height=100 trailer.height=72 by=("op_op_nonsubjekt" ) header.color="536870912" trailer.color="536870912" )
text(band=header.1 alignment="2" text="Průvodka výrobního příkazu:" border="0" color="0" x="1874" y="8" height="64" width="873"  name=product_order_cislo_subjektu_t  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="Výrobek:" border="0" color="0" x="41" y="112" height="64" width="293"  name=kk_kk_refer_t  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="1" text="Var:" border="0" color="0" x="2043" y="112" height="64" width="119"  name=varianta_varianta_refer_t  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="1" text="Sklad odvedení:" border="0" color="0" x="2414" y="112" height="64" width="549"  name=op_op_line_t  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.1 id=2 alignment="1" tabsequence=32766 border="0" color="0" x="2757" y="4" height="96" width="544" format="[general]"  name=product_order_refer edit.limit=30 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-14" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.1 id=3 alignment="0" tabsequence=32766 border="0" color="0" x="329" y="100" height="84" width="585" format="[general]"  name=kk_kk_refer edit.limit=30 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-14" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.1 id=4 alignment="0" tabsequence=32766 border="0" color="0" x="937" y="112" height="64" width="1093" format="[general]"  name=kk_kk_nazev edit.limit=80 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.1 id=7 alignment="0" tabsequence=32766 border="0" color="0" x="2176" y="112" height="64" width="224" format="[general]"  name=varianta_varianta_refer edit.limit=30 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.1 id=12 alignment="0" tabsequence=32766 border="0" color="0" x="2976" y="112" height="64" width="325" format="[general]"  name=sklad_odvedeni_sklad_odvedeni_1 ddlb.limit=0 ddlb.allowedit=no ddlb.case=any  font.face="Arial CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="1" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="1" text="čas operace" border="0" color="0" x="1938" y="384" height="64" width="402"  name=t_12  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="Operace" border="0" color="0" x="46" y="384" height="64" width="256"  name=t_1  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="1" text="Pracoviště" border="0" color="0" x="466" y="384" height="64" width="366"  name=t_2  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="1" text="Skutečný čas" border="0" color="0" x="2793" y="384" height="64" width="439"  name=t_13  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="Komponenta" border="0" color="0" x="41" y="512" height="64" width="402"  name=t_14  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="2" text="Mn. na VP" border="0" color="0" x="2958" y="508" height="64" width="343"  name=t_18  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="2" text="Popis" border="0" color="0" x="535" y="512" height="64" width="206"  name=t_28  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="-----------------------------------------------------------------------------------------" border="0" color="0" x="41" y="444" height="64" width="3259"  name=t_7  font.face="Courier New CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="1" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="-----------------------------------------------------------------------------------------" border="0" color="0" x="41" y="336" height="64" width="3259"  name=t_20  font.face="Courier New CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="1" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="-----------------------------------------------------------------------------------------" border="0" color="0" x="41" y="568" height="64" width="3259"  name=t_19  font.face="Courier New CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="1" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="2" text="Datum:" border="0" color="0" x="1833" y="272" height="64" width="219"  name=t_8  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="1" text="Ukončení:" border="0" color="0" x="2514" y="272" height="64" width="334"  name=t_9  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.1 id=13 alignment="0" tabsequence=32766 border="0" color="0" x="2062" y="272" height="64" width="443" format="dd.mm.yyyy"  name=product_order_datum_1 edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="1" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.1 id=14 alignment="0" tabsequence=32766 border="0" color="0" x="2857" y="272" height="64" width="443" format="dd.mm.yyyy"  name=product_order_datum_end_1 edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Arial CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="1" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="1" text="Zak:" border="0" color="0" x="1934" y="192" height="64" width="151"  name=zakazka_zakazka_refer_t  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.1 id=30 alignment="0" tabsequence=32766 border="0" color="0" x="2555" y="192" height="68" width="750" format="[general]"  name=zakazka_nazev edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Arial CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.1 id=8 alignment="0" tabsequence=32766 border="0" color="0" x="2094" y="192" height="64" width="448" format="[general]"  name=zakazka_zakazka_refer edit.limit=30 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="Pro:" border="0" color="0" x="41" y="192" height="64" width="146"  name=t_24  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.1 id=29 alignment="0" tabsequence=32766 border="0" color="0" x="210" y="192" height="64" width="1595" format="[general]"  name=organizace_nazev edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="0" text="Množství:" border="0" color="0" x="46" y="276" height="64" width="329"  name=t_5  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.1 id=10 alignment="0" tabsequence=32766 border="0" color="0" x="389" y="264" height="96" width="457" format="#,##0.00"  name=product_order_mnozstvi_1 edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Arial CE" font.height="-14" font.weight="700"  font.family="1" font.pitch="1" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="2" text="Zbývá vydat" border="0" color="0" x="2528" y="512" height="64" width="315"  name=t_29  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="1" text="Mn.jedn." border="0" color="0" x="2062" y="512" height="64" width="311"  name=t_16  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="2" text="MJ" border="0" color="0" x="2386" y="512" height="64" width="101"  name=t_17  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="2" text="Dod." border="0" color="0" x="1920" y="512" height="64" width="146"  name=t_23  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="2" text="/" border="0" color="0" x="1861" y="512" height="64" width="46"  name=t_22  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.1 alignment="2" text="Sklad" border="0" color="0" x="1646" y="512" height="64" width="201"  name=t_15  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.2 alignment="0" text="-----------------------------------------------------------------------------------------" border="0" color="0" x="41" y="48" height="64" width="3255"  name=t_3  font.face="Courier New CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="1" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.2 id=18 alignment="1" tabsequence=32766 border="0" color="0" x="1819" y="4" height="64" width="329" format="#,##0.00"  name=op_op_cas edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.2 alignment="1" text="-" border="0" color="0" x="352" y="4" height="64" width="41"  name=t_10  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.2 alignment="1" text="Skut.čas: .   .   .   .   .   ." border="0" color="0" x="2322" y="4" height="64" width="955"  name=t_11  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.2 id=16 alignment="1" tabsequence=32766 border="0" color="0" x="41" y="4" height="64" width="293" format="[general]"  name=op_op_nazev edit.limit=40 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.2 id=17 alignment="0" tabsequence=32766 border="0" color="0" x="571" y="4" height="64" width="855" format="[general]"  name=prac_op_pracoviste_nazev edit.limit=40 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header.2 alignment="0" text="Min." border="0" color="0" x="2162" y="4" height="64" width="146"  name=t_6  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
column(band=header.2 id=15 alignment="0" tabsequence=32766 border="0" color="0" x="407" y="4" height="64" width="146" format="[general]"  name=op_op_line edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="1" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=27 alignment="1" tabsequence=32766 border="0" color="0" x="2958" y="4" height="64" width="329" format="#,##0.00"  name=qty_for_po edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=21 alignment="0" tabsequence=32766 border="0" color="0" x="41" y="4" height="64" width="553" format="[general]"  name=komp_komp_reference edit.limit=30 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=22 alignment="0" tabsequence=32766 border="0" color="0" x="603" y="4" height="64" width="1083" format="[general]"  name=komp_komp_nazev edit.limit=80 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=detail alignment="0" text="-----------------------------------------------------------------------------------------" border="0" color="0" x="37" y="136" height="64" width="3264"  name=t_4  font.face="Courier New CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="1" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=23 alignment="1" tabsequence=32766 border="0" color="0" x="2075" y="4" height="64" width="329" format="#,##0.00"  name=kus_qty edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=detail alignment="2" text="/" border="0" color="0" x="1865" y="4" height="64" width="46"  name=t_21  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
column(band=detail id=24 alignment="0" tabsequence=32766 border="0" color="0" x="2423" y="4" height="64" width="165" format="[general]"  name=mj_komp_komp_mj_refer edit.limit=30 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=25 alignment="1" tabsequence=32766 border="0" color="0" x="1710" y="4" height="64" width="142" format="[general]"  name=sklad_kus_skald_kus_refer edit.limit=30 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=28 alignment="0" tabsequence=32766 border="0" color="0" x="1925" y="4" height="64" width="133" format="[general]"  name=dodavatel_ref edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="1" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=31 alignment="1" tabsequence=32766 border="0" color="0" x="2606" y="4" height="64" width="329" format="#,##0.00"  name=qty_remain edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=trailer.1 alignment="0" text="---------------------------------------------------------------" border="0" color="0" x="87" y="188" height="88" width="3191"  name=t_27  font.face="Courier New CE" font.height="-14" font.weight="700"  font.family="1" font.pitch="1" font.charset="238" background.mode="1" background.color="536870912" )
column(band=trailer.1 id=33 alignment="0" tabsequence=32766 border="0" color="0" x="91" y="92" height="64" width="3191" format="[general]"  name=note edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=trailer.1 id=32 alignment="0" tabsequence=32766 border="0" color="0" x="91" y="20" height="64" width="3191" format="[general]"  name=org_poznamka edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="0" expression="year( today() )"border="0" color="0" x="590" y="324" height="92" width="297" format="[GENERAL]"  name=compute_1  font.face="Arial CE" font.height="-14" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=trailer.1 alignment="0" text=".       ." border="0" color="0" x="297" y="324" height="92" width="206"  name=t_30  font.face="Arial CE" font.height="-14" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=trailer.1 alignment="0" text="kontrola" border="0" color="0" x="2848" y="432" height="64" width="238"  name=t_26  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=trailer.1 alignment="0" text="Datum ukončení" border="0" color="0" x="251" y="432" height="64" width="471"  name=t_25  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" )
  
 
$PBExportHeader$dw_kmen_sk_tisk_tab.srd
release 7;
datawindow(units=0 timer_interval=0 color=16777215 processing=0 HTMLDW=no print.documentname="" print.orientation = 2 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.prompt=no print.buttons=no print.preview.buttons=no )
header(height=332 color="536870912" )
summary(height=0 color="536870912" )
footer(height=100 color="536870912" )
detail(height=88 color="536870912" )
table(column=(type=long update=yes updatewhereclause=yes key=yes name=cislo_subjektu dbname="subjekty.cislo_subjektu" )
 column=(type=char(30) update=yes updatewhereclause=yes name=reference_subjektu dbname="subjekty.reference_subjektu" )
 column=(type=char(80) update=yes updatewhereclause=yes key=yes name=nazev_subjektu dbname="subjekty.nazev_subjektu" )
 column=(type=long update=yes updatewhereclause=yes key=yes name=cislo_poradace dbname="subjekty.cislo_poradace" )
 column=(type=char(80) update=yes updatewhereclause=yes name=alternativni_nazev dbname="subjekty.alternativni_nazev" )
 column=(type=decimal(4) update=yes updatewhereclause=yes name=sazba_dph dbname="subjekty.sazba_dph" )
 column=(type=long update=yes updatewhereclause=yes name=merna_jednotka dbname="subjekty.merna_jednotka" )
 column=(type=char(30) update=yes updatewhereclause=yes name=reference_subjektu_1 dbname="subjekty.reference_subjektu" )
 column=(type=char(5) update=yes updatewhereclause=yes name=usporadaci_znak dbname="subjekty.usporadaci_znak" )
 column=(type=char(1) update=yes updatewhereclause=yes name=typ_kmen_karta dbname="subjekty.typ_kmen_karta" values="Z	Z/S	S/O	O/" )
 column=(type=long update=yes updatewhereclause=yes name=prefix dbname="subjekty.prefix" )
 column=(type=char(30) update=yes updatewhereclause=yes name=reference_subjektu_2 dbname="subjekty.reference_subjektu" )
 column=(type=char(30) update=yes updatewhereclause=yes name=uctovaci_skupina dbname="uctovaci_skupina" )
 retrieve="SELECT 
  lcs.kmenova_karta_skladu.cislo_subjektu,   
  lcs.kmenova_karta_skladu.reference_subjektu,     
  lcs.kmenova_karta_skladu.nazev_subjektu,   
  lcs.kmenova_karta_skladu.cislo_poradace, 
  lcs.kmenova_karta_skladu.alternativni_nazev,   
  lcs.kmenova_karta_skladu.sazba_dph,   

  lcs.kmenova_karta_skladu.merna_jednotka,   
  s1.reference_subjektu,   

  lcs.kmenova_karta_skladu.usporadaci_znak, 
  lcs.kmenova_karta_skladu.typ_kmen_karta,

  lcs.kmenova_karta_skladu.prefix,
  s2.reference_subjektu,

  (select s3.reference_subjektu from lcs.subjekty s3 where s3.cislo_subjektu in 
     (select lcs.vztahysubjektu.cislo_subjektu from lcs.vztahysubjektu where
     lcs.vztahysubjektu.cislo_vztaz_subjektu = lcs.kmenova_karta_skladu.cislo_subjektu and 
     (lcs.vztahysubjektu.cislo_vztahu = 2194 ))) uctovaci_skupina
         
FROM lcs.kmenova_karta_skladu   
  LEFT OUTER JOIN lcs.subjekty s1 ON s1.cislo_subjektu = lcs.kmenova_karta_skladu.merna_jednotka
  LEFT OUTER JOIN lcs.subjekty s2 ON s2.cislo_subjektu = lcs.kmenova_karta_skladu.prefix

ORDER BY uctovaci_skupina, lcs.kmenova_karta_skladu.reference_subjektu     

 
" update="lcs.subjekty" updatewhere=1 updatekeyinplace=no )
group(level=1 header.height=124 trailer.height=0 by=("uctovaci_skupina" ) header.color="536870912" trailer.color="536870912" )
text(band=header alignment="2" text="Opis kmenových karet dle účtovacích skupin" border="0" color="0" x="389" y="28" height="112" width="1975"  name=t_6  font.face="Times New Roman CE" font.height="-18" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Uspořádací znak" border="0" color="0" x="2523" y="196" height="120" width="288"  name=usporadaci_znak_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=header x1="27" y1="324" x2="3337" y2="324"  name=l_1 pen.style="0" pen.width="5" pen.color="0"  background.mode="2" background.color="16777215" )
text(band=header.1 alignment="0" text="Účtovací skupina:" border="0" color="0" x="37" y="24" height="64" width="439"  name=t_1  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
column(band=header.1 id=13 alignment="0" tabsequence=32766 border="0" color="0" x="498" y="24" height="64" width="690" format="[general]"  name=uctovaci_skupina edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
line(band=header.1 x1="27" y1="104" x2="1189" y2="104"  name=l_3 pen.style="0" pen.width="5" pen.color="0"  background.mode="2" background.color="16777215" )
column(band=detail id=2 alignment="0" tabsequence=32766 border="0" color="0" x="37" y="4" height="76" width="229" format="[general]"  name=reference_subjektu edit.limit=30 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=3 alignment="0" tabsequence=32766 border="0" color="0" x="288" y="4" height="76" width="855" format="[general]"  name=nazev_subjektu edit.limit=80 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=12 alignment="0" tabsequence=32766 border="0" color="0" x="3118" y="4" height="76" width="224" format="[general]"  name=reference_subjektu_2 edit.limit=30 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=8 alignment="0" tabsequence=32766 border="0" color="0" x="2843" y="4" height="76" width="261" format="[general]"  name=reference_subjektu_1 edit.limit=30 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=9 alignment="0" tabsequence=32766 border="0" color="0" x="2523" y="4" height="76" width="279" format="[general]"  name=usporadaci_znak edit.name="valuace_atributu" ddlb.limit=0 ddlb.allowedit=no ddlb.case=any ddlb.nilisnull=yes ddlb.vscrollbar=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=6 alignment="1" tabsequence=32766 border="0" color="0" x="2139" y="4" height="76" width="183" format="#,##0.00"  name=sazba_dph accelerator=" " edit.name="sazby_dane" dddw.name=dw_sazba_dane_typ dddw.displaycolumn=sazba_dane_sazbastr dddw.datacolumn=sazba_dane_sazba dddw.percentwidth=100 dddw.lines=0 dddw.limit=0 dddw.allowedit=no dddw.useasborder=no dddw.case=any dddw.nilisnull=yes dddw.vscrollbar=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=5 alignment="0" tabsequence=32766 border="0" color="0" x="1198" y="4" height="76" width="914" format="[general]"  name=alternativni_nazev edit.limit=80 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=10 alignment="0" tabsequence=32766 border="0" color="0" x="2386" y="4" height="76" width="101" format="[general]"  name=typ_kmen_karta edit.name="typ_kmen_karta" ddlb.limit=0 ddlb.allowedit=no ddlb.case=any ddlb.required=yes ddlb.nilisnull=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=footer x1="27" y1="8" x2="3346" y2="8"  name=l_2 pen.style="0" pen.width="5" pen.color="0"  background.mode="2" background.color="16777215" )
text(band=footer alignment="2" text="LCS.Noris" border="0" color="0" x="1787" y="28" height="56" width="280"  name=t_4  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=footer alignment="2" text=" " border="0" color="0" x="1961" y="16" height="76" width="41"  name=t_3  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=footer alignment="1" text="Opis kmenových karet dle účtovacích skupin, 4213" border="0" color="0" x="2254" y="20" height="56" width="1088"  name=t_5  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=footer alignment="0" expression="fg_org_vlast_nazev()"border="0" color="0" x="37" y="20" height="64" width="1518" format="[GENERAL]"  name=compute_1  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
text(band=header alignment="1" text="Sazba DPH" border="0" color="0" x="2144" y="196" height="120" width="178"  name=sazba_dph_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Doplňkový název" border="0" color="0" x="1193" y="252" height="64" width="494"  name=alternativni_nazev_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Název" border="0" color="0" x="288" y="252" height="64" width="210"  name=nazev_subjektu_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Číslo" border="0" color="0" x="37" y="252" height="64" width="146"  name=reference_subjektu_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Typ" border="0" color="0" x="2382" y="252" height="64" width="101"  name=typ_kmen_karta_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="MJ" border="0" color="0" x="2843" y="252" height="64" width="105"  name=merna_jednotka_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Prefix" border="0" color="0" x="3118" y="252" height="64" width="155"  name=prefix_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=header alignment="0" expression="'Stránka: ' + page() + '/' + pageCount()"border="0" color="0" x="2706" y="12" height="72" width="635" format="[general]"  name=page_1  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
compute(band=header alignment="0" expression="'Datum: ' + string(today(),~"dd.mm.yyyy hh:mm~")"border="0" color="0" x="2706" y="96" height="72" width="635" format="[general]"  name=compute_2  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" )
 
 
 
$PBExportHeader$dw_opis_fv_uhr_ke_dni.srd
release 7;
datawindow(units=0 timer_interval=0 color=1090519039 processing=0 HTMLDW=no print.documentname="" print.orientation = 2 print.margin.left = 110 print.margin.right = 110 print.margin.top = 97 print.margin.bottom = 97 print.paper.source = 0 print.paper.size = 9 print.prompt=no print.buttons=no print.preview.buttons=no )
header(height=544 color="536870912" )
summary(height=88 color="536870912" )
footer(height=96 color="536870912" )
detail(height=76 color="553648127"  height.autosize=yes)
table(column=(type=long updatewhereclause=yes name=subjekty_cislo_subjektu dbname="faktura_vydana_hlavicka.cislo_subjektu" )
 column=(type=char(30) updatewhereclause=yes name=int_cislo dbname="faktura_vydana_hlavicka.int_cislo" )
 column=(type=char(40) updatewhereclause=yes name=c_fak dbname="faktura_vydana_hlavicka.c_fak" )
 column=(type=char(40) updatewhereclause=yes name=firma dbname="faktura_vydana_hlavicka.firma" )
 column=(type=decimal(4) updatewhereclause=yes name=faktura_dosla_hlavicka_cena_celkem dbname="faktura_vydana_hlavicka.cena_celkem" )
 column=(type=datetime updatewhereclause=yes name=faktura_dosla_hlavicka_datum_porizeni dbname="faktura_vydana_hlavicka.datum_porizeni" )
 column=(type=datetime updatewhereclause=yes name=faktura_dosla_hlavicka_datum_duzp dbname="faktura_vydana_hlavicka.datum_duzp" )
 column=(type=datetime updatewhereclause=yes name=datum_splatnosti dbname="faktura_vydana_hlavicka.datum_splatnosti" )
 column=(type=char(1) updatewhereclause=yes name=faktura_dosla_hlavicka_stav dbname="faktura_vydana_hlavicka.stav" values="Pořízeno	0/Zaúčtováno	1/Stornováno	7/Předzaúčtováno	9/" )
 column=(type=decimal(4) updatewhereclause=yes name=faktura_dosla_hlavicka_zbyva_uhradit dbname="faktura_vydana_hlavicka.zbyva_uhradit" )
 column=(type=long updatewhereclause=yes name=faktura_dosla_hlavicka_stav_pp dbname="faktura_vydana_hlavicka.stav_pp" )
 column=(type=datetime updatewhereclause=yes name=uhr_datum dbname="faktura_vydana_hlavicka.uhr_datum" )
 column=(type=decimal(4) updatewhereclause=yes name=uhr_castka dbname="faktura_vydana_hlavicka.uhr_castka" )
 column=(type=char(1) updatewhereclause=yes name=typ_uhr dbname="faktura_vydana_hlavicka.typ_uhr" )
 column=(type=decimal(4) updatewhereclause=yes name=cena_celkem_pro_soucet dbname="cena_celkem_pro_soucet" )
 column=(type=long updatewhereclause=yes name=den_ke_dni dbname="den_ke_dni" )
 column=(type=long updatewhereclause=yes name=mesic_ke_dni dbname="mesic_ke_dni" )
 column=(type=long updatewhereclause=yes name=rok_ke_dni dbname="rok_ke_dni" )
 retrieve="SELECT
 fvh.cislo_subjektu,
 s_fak.reference_subjektu int_cislo,
 s_fak.nazev_subjektu c_fak,
 s_org.nazev_subjektu firma,
 fvh.cena_celkem,
 fvh.datum_porizeni,
 fvh.datum_duzp,
 fvh.datum_splatnosti,
 fvh.stav, 
 fvh.zbyva_uhradit,
 fvh.stav_pp,
 uhr.datum_uhrady uhr_datum,
 uhr.castka uhr_castka,
 uhr.typ_uhrady typ_uhr,
/-* odub kvuli chybe Buildru v dw_okne pri tvorbe computed fieldu z jinych computed fieldu *-/
 (case when (select min(u.cislo_nonsubjektu) from lcs.uhrady u where u.hraz_dokl_subjekt=fvh.cislo_subjektu
            and u.datum_uhrady <= :ke_dni)=uhr.cislo_nonsubjektu or 
            (select min(u.cislo_nonsubjektu) from lcs.uhrady u where u.hraz_dokl_subjekt=fvh.cislo_subjektu
            and u.datum_uhrady <= :ke_dni) is null
       then fvh.cena_celkem
       else 0
 end) cena_celkem_pro_soucet,
 DATEPART(day, :ke_dni) den_ke_dni,
 DATEPART(month, :ke_dni) mesic_ke_dni,
 DATEPART(year, :ke_dni) rok_ke_dni

FROM lcs.faktura_vydana_hlavicka fvh
  LEFT OUTER JOIN lcs.subjekty s_fak ON s_fak.cislo_subjektu = fvh.cislo_subjektu
  LEFT OUTER JOIN lcs.subjekty s_org ON  fvh.organizace = s_org.cislo_subjektu
  LEFT OUTER JOIN lcs.uhrady uhr	ON uhr.hraz_dokl_subjekt = fvh.cislo_subjektu and uhr.datum_uhrady <= :ke_dni

WHERE (fvh.zbyva_uhradit<>0 or fvh.datum_posledni_platby > :ke_dni) and fvh.datum_porizeni <= :ke_dni

ORDER BY s_fak.reference_subjektu ASC

" arguments=(("Ke_dni", datetime)) )
group(level=1 header.height=0 trailer.height=4 by=("subjekty_cislo_subjektu" ) header.color="553648127" trailer.color="553648127" )
compute(band=header alignment="0" expression="'Stránka: ' + page() + '/' + pageCount()"border="0" color="0" x="2706" y="12" height="72" width="635" format="[general]"  name=page_1  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
compute(band=header alignment="0" expression="'Datum: ' + string(today(),~"dd.mm.yyyy hh:mm~")"border="0" color="0" x="2706" y="96" height="72" width="635" format="[general]"  name=compute_2  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
text(band=header alignment="1" text="Zbývá uhradit" border="0" color="0" x="3109" y="408" height="124" width="233"  name=k_zaplaceni_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="1" text="Uhrazená částka" border="0" color="0" x="2715" y="408" height="124" width="256"  name=uhrada_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=header x1="5" y1="540" x2="3346" y2="540"  name=l_1 pen.style="0" pen.width="5" pen.color="0"  background.mode="1" background.color="553648127" )
compute(band=header alignment="0" expression="'Opis faktur vydaných s úhradami ke dni (včetně) ' +  den_ke_dni + '.' +  mesic_ke_dni + '.' + rok_ke_dni "border="0" color="0" x="5" y="232" height="136" width="3342" format="[GENERAL]"  name=compute_1  font.face="Times New Roman CE" font.height="-18" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
text(band=header alignment="0" text="Uhrazeno dne" border="0" color="0" x="2254" y="408" height="124" width="251"  name=uhr_datum_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Číslo faktury" border="0" color="0" x="366" y="468" height="64" width="352"  name=c_fak_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Odběratel" border="0" color="0" x="736" y="468" height="64" width="302"  name=firma_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Splatno" border="0" color="0" x="1938" y="468" height="64" width="224"  name=datum_splatnosti_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="1" text="Cena celkem" border="0" color="0" x="1527" y="468" height="64" width="379"  name=faktura_dosla_hlavicka_cena_celkem_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Interní číslo" border="0" color="0" x="14" y="468" height="64" width="288"  name=int_cislo_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=detail alignment="1" expression=" faktura_dosla_hlavicka_cena_celkem - sum(uhrada for group 1)"border="0" color="0" x="2985" y="4" height="64" width="357" format="#,##0.00"  name=k_zaplaceni  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=2 alignment="0" tabsequence=32766 border="0" color="0" x="14" y="4" height="64" width="338" format="[general]"  name=int_cislo edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=3 alignment="0" tabsequence=32766 border="0" color="0" x="366" y="4" height="64" width="357" format="[general]"  name=c_fak edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=4 alignment="0" tabsequence=32766 border="0" color="0" x="736" y="4" height="64" width="718" format="[general]"  name=firma edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=detail alignment="1" expression="if( typ_uhr = '4' ,  (uhr_castka * (-1))  ,  uhr_castka  )"border="0" color="0" x="2546" y="4" height="64" width="425" format="#,##0.00"  name=uhrada  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=12 alignment="0" tabsequence=32766 border="0" color="0" x="2254" y="4" height="64" width="279" format="dd.mm.yyyy"  name=uhr_datum edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=8 alignment="0" tabsequence=32766 border="0" color="0" x="1938" y="4" height="64" width="302" format="dd.mm.yyyy"  name=datum_splatnosti edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=5 alignment="1" tabsequence=32766 border="0" color="0" x="1472" y="4" height="64" width="434" format="#,##0.00"  name=faktura_dosla_hlavicka_cena_celkem edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
line(band=trailer.1 x1="5" y1="0" x2="3346" y2="0"  name=l_2 pen.style="0" pen.width="5" pen.color="0"  background.mode="1" background.color="553648127" )
compute(band=summary alignment="1" expression="sum(  cena_celkem_pro_soucet  for all ) - sum( if( typ_uhr = '4' ,  (uhr_castka * (-1))  ,  uhr_castka  ) for all )"border="0" color="0" x="2862" y="16" height="64" width="480" format="##,###,##0.00"  name=compute_6  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=summary alignment="1" text="Zbývá uhradit" border="0" color="0" x="2437" y="16" height="64" width="411"  name=t_3  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=summary alignment="1" text="Cena celkem:" border="0" color="0" x="992" y="16" height="64" width="379"  name=t_2  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="sum(  cena_celkem_pro_soucet  for all )"border="0" color="0" x="1390" y="16" height="64" width="517" format="##,###,##0.00"  name=compute_3  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
line(band=summary x1="5" y1="4" x2="3346" y2="4"  name=l_3 pen.style="0" pen.width="5" pen.color="0"  background.mode="1" background.color="553648127" )
text(band=footer alignment="0" text="Ke dni včetně,date" border="0" color="255" x="1472" y="20" height="64" width="549"  name=parametry visible="1~t0"  font.face="Arial CE" font.height="-10" font.weight="700"  font.family="2" font.pitch="2" font.charset="238" font.italic="1" background.mode="2" background.color="16777215" )
text(band=footer alignment="2" text=" " border="0" color="0" x="2222" y="8" height="76" width="41"  name=t_4  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=footer alignment="2" text="LCS.Noris" border="0" color="0" x="2048" y="20" height="56" width="279"  name=t_5  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=footer alignment="1" text="Opis FV s úhradami ke dni, 4141" border="0" color="0" x="2656" y="12" height="56" width="686"  name=t_6  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=footer x1="9" y1="0" x2="3351" y2="0"  name=l_4 pen.style="0" pen.width="5" pen.color="0"  background.mode="2" background.color="16777215" )
compute(band=footer alignment="0" expression="fg_org_vlast_nazev()"border="0" color="0" x="14" y="12" height="64" width="1518" format="[GENERAL]"  name=compute_7  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )

sparse(names="faktura_dosla_hlavicka_cena_celkem	k_zaplaceni	c_fak	int_cislo	firma	datum_splatnosti")htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" )
 
 
 
$PBExportHeader$dw_fa_dosla_splatky.srd
release 7;
datawindow(units=0 timer_interval=60000 color=16777215 processing=0 HTMLDW=no print.documentname="" print.orientation = 2 print.margin.left = 110 print.margin.right = 110 print.margin.top = 97 print.margin.bottom = 97 print.paper.source = 0 print.paper.size = 0 print.prompt=no print.buttons=no print.preview.buttons=no )
header(height=592 color="536870912" )
summary(height=4 color="536870912" )
footer(height=96 color="536870912" )
detail(height=12 color="536870912"  height.autosize=yes)
table(column=(type=long updatewhereclause=yes name=cislo_subjektu dbname="cislo_subjektu" )
 column=(type=char(30) updatewhereclause=yes name=reference_subjektu dbname="reference_subjektu" )
 column=(type=datetime updatewhereclause=yes name=datum_porizeni dbname="datum_porizeni" )
 column=(type=datetime updatewhereclause=yes name=datum_splatnosti dbname="datum_splatnosti" )
 column=(type=datetime updatewhereclause=yes name=datum_pripadu dbname="datum_pripadu" )
 column=(type=char(40) updatewhereclause=yes name=organizace_nazev dbname="nazev_subjektu" )
 column=(type=decimal(4) updatewhereclause=yes name=castka_pp dbname="castka_pp" )
 column=(type=decimal(4) updatewhereclause=yes name=suma_spl dbname="suma_spl" )
 column=(type=decimal(4) updatewhereclause=yes name=zbyva_uhradit dbname="zbyva_uhradit" )
 column=(type=long updatewhereclause=yes name=prodleni dbname="prodleni" )
 retrieve="  SELECT lcs.faktura_dosla_hlavicka.cislo_subjektu,   
         subjekty_a.reference_subjektu,   
         lcs.faktura_dosla_hlavicka.datum_porizeni,   
         lcs.faktura_dosla_hlavicka.datum_splatnosti,   
         lcs.faktura_dosla_hlavicka.datum_pripadu,   
         subjekty_b.nazev_subjektu,   
         lcs.faktura_dosla_hlavicka.castka_pp,
			isnull((select sum(spl.castka) from lcs.splatky_faktur spl where spl.prv_doklad = lcs.faktura_dosla_hlavicka.cislo_subjektu),0) suma_spl,
         lcs.faktura_dosla_hlavicka.zbyva_uhradit,
         lcs.faktura_dosla_hlavicka.prodleni   
    FROM lcs.faktura_dosla_hlavicka
         JOIN lcs.subjekty subjekty_a ON lcs.faktura_dosla_hlavicka.cislo_subjektu = subjekty_a.cislo_subjektu    
         JOIN lcs.subjekty subjekty_b ON lcs.faktura_dosla_hlavicka.organizace = subjekty_b.cislo_subjektu 
    ORDER BY subjekty_b.nazev_subjektu ASC, subjekty_a.reference_subjektu ASC 
	
   " )
group(level=1 header.height=128 trailer.height=96 by=("organizace_nazev" ) header.color="536870912" trailer.color="536870912" )
group(level=2 header.height=100 trailer.height=0 by=("cislo_subjektu" ) header.color="536870912" trailer.color="536870912" )
compute(band=header alignment="0" expression="fg_org_vlast_nazev()"border="0" color="0" x="37" y="24" height="88" width="1696" format="[GENERAL]"  name=compute_11  font.face="Times New Roman CE" font.height="-14" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
compute(band=header alignment="0" expression="fg_org_vlast_ulice() + ', ' + fg_org_vlast_psc() + ' - ' + fg_org_vlast_misto()"border="0" color="0" x="32" y="132" height="88" width="2670" format="[GENERAL]"  name=compute_12  font.face="Times New Roman CE" font.height="-14" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
compute(band=header alignment="0" expression="fg_org_vlast_spisova_znacka()"border="0" color="0" x="37" y="240" height="68" width="3136" format="[GENERAL]"  name=compute_13  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
line(band=header x1="23" y1="580" x2="3342" y2="576"  name=l_1 pen.style="0" pen.width="9" pen.color="0"  background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="fm(MSG154)" border="0" color="0" x="32" y="344" height="112" width="3145"  name=t_4  font.face="Times New Roman CE" font.height="-18" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="IČ:" border="0" color="0" x="1742" y="24" height="88" width="114"  name=t_1  font.face="Times New Roman CE" font.height="-14" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=header alignment="0" expression="fg_org_vlast_ico()"border="0" color="0" x="1879" y="24" height="88" width="814" format="[GENERAL]"  name=compute_14  font.face="Times New Roman CE" font.height="-14" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
compute(band=header alignment="0" expression="'Datum: ' + string(today(),~"dd.mm.yyyy hh:mm~")"border="0" color="0" x="2715" y="128" height="72" width="654" format="[general]"  name=compute_2  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
compute(band=header alignment="0" expression="'Stránka: ' + page() + '/' + pageCount()"border="0" color="0" x="2715" y="24" height="72" width="654" format="[general]"  name=page_1  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
text(band=header alignment="0" text="Int. číslo" border="0" color="0" x="32" y="496" height="64" width="475"  name=reference_subjektu_t  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="fm(MSG099)" border="0" color="0" x="517" y="496" height="64" width="270"  name=datum_porizeni_t  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="fm(MSG018)" border="0" color="0" x="805" y="496" height="64" width="270"  name=datum_splatnosti_t  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="1" text="fm(MSG100)" border="0" color="0" x="1088" y="496" height="64" width="325"  name=datum_pripadu_t  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="1" text="fm(MSG101)" border="0" color="0" x="1426" y="496" height="64" width="402"  name=castka_pp_t  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="1" text="fm(MSG102)" border="0" color="0" x="1842" y="496" height="64" width="411"  name=suma_spl_t  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="1" text="fm(MSG069)" border="0" color="0" x="2267" y="496" height="64" width="407"  name=zbyva_uhradit_t  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="1" text="fm(MSG103)" border="0" color="0" x="2688" y="496" height="64" width="357"  name=compute_1_t  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="1" text="fm(MSG104)" border="0" color="0" x="3054" y="496" height="64" width="297"  name=prodleni_t  font.face="Arial CE" font.height="-10" font.weight="400"  font.family="0" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=header.1 x1="14" y1="112" x2="3333" y2="112"  name=l_2 pen.style="0" pen.width="5" pen.color="0"  background.mode="1" background.color="553648127" )
text(band=header.1 alignment="0" text="fm(MSG106)" border="0" color="0" x="32" y="28" height="64" width="361"  name=organizace_nazev_t  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=header.1 id=6 alignment="0" tabsequence=32766 border="0" color="0" x="402" y="28" height="64" width="1125" format="[general]"  name=organizace_nazev edit.limit=40 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=header.1 id=1 alignment="1" tabsequence=32766 border="0" color="0" x="1774" y="28" height="76" width="480" format="[general]"  name=cislo_subjektu visible="1~t0" edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Arial" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=header.2 id=2 alignment="0" tabsequence=32766 border="0" color="0" x="32" y="20" height="76" width="475" format="[general]"  name=reference_subjektu edit.limit=30 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=header.2 id=3 alignment="0" tabsequence=32766 border="0" color="0" x="521" y="20" height="76" width="270" format="dd.mm.yyyy"  name=datum_porizeni edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=header.2 id=4 alignment="0" tabsequence=32766 border="0" color="0" x="809" y="20" height="76" width="270" format="dd.mm.yyyy"  name=datum_splatnosti edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=header.2 id=5 alignment="0" tabsequence=32766 border="0" color="0" x="1102" y="20" height="76" width="302" format="dd.mm.yyyy"  name=datum_pripadu edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=header.2 id=7 alignment="1" tabsequence=32766 border="0" color="0" x="1413" y="20" height="76" width="421" format="##,###,###,##0.00"  name=castka_pp edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="0" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=header.2 id=8 alignment="1" tabsequence=32766 border="0" color="0" x="1847" y="20" height="76" width="421" format="##,###,###,##0.00"  name=suma_spl edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.2 id=9 alignment="1" tabsequence=32766 border="0" color="0" x="2281" y="20" height="76" width="384" format="##,###,###,##0.00"  name=zbyva_uhradit edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=header.2 alignment="1" expression=" zbyva_uhradit  -  suma_spl "border="0" color="0" x="2688" y="20" height="76" width="379" format="##,###,###,##0.00"  name=compute_1  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=header.2 id=10 alignment="1" tabsequence=32766 border="0" color="0" x="3104" y="20" height="76" width="238" format="[general]"  name=prodleni edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
report(band=detail dataobject="dw_nested_fa_vydana_splatky" x="18" y="0" height="72" width="3323" border="0"  height.autosize=yes criteria="" nest_arguments=((" cislo_subjektu ")) trail_footer = yes  name=dw_1  slideup=directlyabove )
text(band=trailer.1 alignment="0" text="fm(MSG107)" border="0" color="0" x="23" y="8" height="64" width="558"  name=t_3  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="0" expression=" organizace_nazev "border="0" color="0" x="594" y="8" height="64" width="782" format="[GENERAL]"  name=compute_9  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=trailer.1 alignment="0" text=":" border="0" color="0" x="1381" y="8" height="64" width="27"  name=t_5  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="1" expression="sum(  castka_pp  for group 1 )"border="0" color="0" x="1413" y="8" height="64" width="421" format="##,###,###,##0.00"  name=compute_4  font.face="Times New Roman CE" font.height="-8" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="1" expression="sum(  suma_spl  for group 1 )"border="0" color="0" x="1847" y="8" height="64" width="421" format="##,###,###,##0.00"  name=compute_6  font.face="Times New Roman CE" font.height="-8" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="1" expression="sum(  zbyva_uhradit  for group 1 )"border="0" color="0" x="2290" y="8" height="64" width="384" format="##,###,###,##0.00"  name=compute_7  font.face="Times New Roman CE" font.height="-8" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="1" expression="sum(  compute_1  for group 1 )"border="0" color="0" x="2706" y="8" height="64" width="379" format="##,###,###,##0.00"  name=compute_8  font.face="Times New Roman CE" font.height="-8" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=footer alignment="0" expression="fg_org_vlast_nazev()"border="0" color="0" x="32" y="16" height="64" width="1614" format="[GENERAL]"  name=compute_5  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
compute(band=footer alignment="0" expression="fg_nazev_produktu()"border="0" color="0" x="1669" y="16" height="64" width="690" format="[GENERAL]"  name=compute_3  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
text(band=footer alignment="1" text="fm(MSG153)" border="0" color="0" x="2377" y="16" height="56" width="969"  name=t_9  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" )
  
 
 
$PBExportHeader$dw_sumace_zp_za_pojistovny.srd
release 11;
datawindow(units=0 timer_interval=0 color=16777215 processing=0 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 97 print.margin.bottom = 97 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes print.preview.outline=yes hidegrayline=no showbackcoloronxp=no )
header(height=540 color="536870912" )
summary(height=104 color="536870912" )
footer(height=104 color="536870912" )
detail(height=0 color="536870912" )
table(column=(type=long updatewhereclause=yes name=mzdy_hlavicka_zdr_pojist dbname="mzdy_hlavicka.zdr_pojist" )
 column=(type=char(40) updatewhereclause=yes name=subjekty_nazev_subjektu dbname="subjekty.nazev_subjektu" )
 column=(type=decimal(4) updatewhereclause=yes name=hr_mzda dbname="mzdy_hlavicka.hr_mzda" )
 column=(type=decimal(4) updatewhereclause=yes name=zakl_zdr dbname="mzdy_hlavicka.zakl_zdr" )
 column=(type=decimal(4) updatewhereclause=yes name=odvod_zdr_zam dbname="mzdy_hlavicka.odvod_zdr_zam" )
 column=(type=decimal(4) updatewhereclause=yes name=odvod_zdr_firma dbname="mzdy_hlavicka.odvod_zdr_firma" )
 column=(type=long updatewhereclause=yes name=mesic dbname="mzdy_hlavicka.mesic" )
 column=(type=long updatewhereclause=yes name=rok dbname="mzdy_hlavicka.rok" )
 column=(type=decimal(4) updatewhereclause=yes name=pocet dbname="pocet" )
 retrieve="  SELECT 
lcs.mzdy_hlavicka.zdr_pojist,
	lcs.subjekty.nazev_subjektu,   
         lcs.mzdy_hlavicka.hr_mzda,   
         lcs.mzdy_hlavicka.zakl_zdr,   
         lcs.mzdy_hlavicka.odvod_zdr_zam,   
         lcs.mzdy_hlavicka.odvod_zdr_firma,   
         lcs.mzdy_hlavicka.mesic,   
         lcs.mzdy_hlavicka.rok,

	/-*Do součtu pojištěnců se musí dostat pouze ty mzdy, které odpovídají kartě hlavního pracovně právního
	vztahu zaměstnance. Tj. pokud má zaměstnanec více prac. právních vztahů a tedy i více karet, musí být do
	součtu započítán pouze jednou.*-/
	lcs.nf_pocet_zp (lcs.mzdy_hlavicka.zdr_pojist,lcs.mzdy_hlavicka.mesic, lcs.mzdy_hlavicka.rok) pocet

    FROM lcs.mzdy_hlavicka left outer join lcs.subjekty  on  lcs.mzdy_hlavicka.zdr_pojist = lcs.subjekty.cislo_subjektu
	join lcs.kontext  on 1 = 1
   WHERE 
	    
         ( lcs.mzdy_hlavicka.rok = datepart(year,lcs.kontext.mzdy_obdobi) ) AND  
         ( lcs.mzdy_hlavicka.mesic = datepart(month,lcs.kontext.mzdy_obdobi) ) 
		and lcs.mzdy_hlavicka.pocitat_zp in (1,3)
ORDER BY lcs.subjekty.nazev_subjektu ASC   
" )
group(level=1 header.height=0 trailer.height=80 by=("subjekty_nazev_subjektu" ) header.color="536870912" trailer.color="536870912" )
text(band=header alignment="2" text="Hrubá mzda" border="0" color="0" x="937" y="452" height="64" width="288" html.valueishtml="0"  name=mzdy_hlavicka_hr_mzda_t visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Základ" border="0" color="0" x="1408" y="452" height="64" width="165" html.valueishtml="0"  name=t_1 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Odvod firma" border="0" color="0" x="2057" y="452" height="64" width="302" html.valueishtml="0"  name=t_2 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Odvod celkem" border="0" color="0" x="2400" y="452" height="64" width="357" html.valueishtml="0"  name=t_3 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Název pojišťovny" border="0" color="0" x="0" y="452" height="64" width="439" html.valueishtml="0"  name=subjekty_nazev_subjektu_t visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Odvod zaměstnanec" border="0" color="0" x="1623" y="396" height="124" width="361" html.valueishtml="0"  name=mzdy_hlavicka_odvod_zdr_zam_t visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=header x1="0" y1="528" x2="3246" y2="528"  name=l_1 visible="1" pen.style="0" pen.width="5" pen.color="0"  background.mode="1" background.color="536870912" )
compute(band=header alignment="0" expression="fg_org_vlast_nazev()"border="0" color="0" x="9" y="16" height="156" width="2290" format="[general]" html.valueishtml="0"  name=compute_1 visible="1"  font.face="Times New Roman CE" font.height="-16" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
text(band=header alignment="0" text="Sumace odvodů ZP za pojišťovny" border="0" color="0" x="919" y="236" height="96" width="1280" html.valueishtml="0"  name=t_4 visible="1"  font.face="Times New Roman CE" font.height="-16" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" font.underline="1" background.mode="1" background.color="553648127" )
compute(band=header alignment="1" expression="string(mesic)+~"/~"+string(rok)"border="0" color="0" x="2528" y="236" height="96" width="686" format="[general]" html.valueishtml="0"  name=compute_3 visible="1"  font.face="Times New Roman CE" font.height="-16" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="Počet pojištěnců:" border="0" color="0" x="2789" y="452" height="64" width="421" html.valueishtml="0"  name=t_5 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=trailer.1 id=2 alignment="0" tabsequence=32766 border="0" color="0" x="5" y="4" height="68" width="873" format="[general]" html.valueishtml="0"  name=subjekty_nazev_subjektu visible="1" edit.limit=40 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="1" expression="sum(hr_mzda for group 1)"border="0" color="0" x="896" y="4" height="68" width="329" format="[general]" html.valueishtml="0"  name=compute_5 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="1" expression="sum(zakl_zdr for group 1)"border="0" color="0" x="1243" y="4" height="68" width="329" format="[general]" html.valueishtml="0"  name=compute_6 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="1" expression="sum(odvod_zdr_zam for group 1)"border="0" color="0" x="1637" y="4" height="68" width="334" format="[general]" html.valueishtml="0"  name=compute_7 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="1" expression="sum(odvod_zdr_firma for group 1)"border="0" color="0" x="2030" y="4" height="68" width="329" format="[general]" html.valueishtml="0"  name=compute_8 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="1" expression="sum( odvod_zdr_zam  +  odvod_zdr_firma  for group 1)"border="0" color="0" x="2455" y="4" height="68" width="302" format="[general]" html.valueishtml="0"  name=compute_9 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=trailer.1 alignment="1" expression="sum(pocet for group 1)"border="0" color="0" x="2853" y="4" height="68" width="334" format="0" html.valueishtml="0"  name=compute_10 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=summary x1="0" y1="4" x2="3246" y2="4"  name=l_2 visible="1" pen.style="0" pen.width="5" pen.color="0"  background.mode="1" background.color="536870912" )
text(band=summary alignment="2" text="Celkem:" border="0" color="0" x="599" y="20" height="60" width="187" html.valueishtml="0"  name=t_6 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="sum(hr_mzda for all)"border="0" color="0" x="896" y="20" height="60" width="329" format="[general]" html.valueishtml="0"  name=compute_11 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="sum(zakl_zdr for all)"border="0" color="0" x="1243" y="20" height="60" width="329" format="[general]" html.valueishtml="0"  name=compute_12 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="sum(odvod_zdr_zam for all)"border="0" color="0" x="1637" y="20" height="60" width="334" format="[general]" html.valueishtml="0"  name=compute_13 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="sum(odvod_zdr_firma for all)"border="0" color="0" x="2030" y="20" height="60" width="329" format="[general]" html.valueishtml="0"  name=compute_14 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="sum( odvod_zdr_zam  +  odvod_zdr_firma  for  all)"border="0" color="0" x="2450" y="20" height="60" width="302" format="[general]" html.valueishtml="0"  name=compute_15 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="sum(pocet for all)"border="0" color="0" x="2853" y="20" height="60" width="334" format="0" html.valueishtml="0"  name=compute_16 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=footer alignment="0" expression="fg_org_vlast_nazev()"border="0" color="0" x="69" y="24" height="64" width="1266" format="[GENERAL]" html.valueishtml="0"  name=compute_17 visible="1"  font.face="Times New Roman" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
compute(band=footer alignment="0" expression="fg_nazev_produktu()"border="0" color="0" x="1385" y="24" height="64" width="567" format="[GENERAL]" html.valueishtml="0"  name=compute_18 visible="1"  font.face="Times New Roman" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
line(band=footer x1="23" y1="8" x2="3246" y2="8"  name=l_3 visible="1" pen.style="0" pen.width="5" pen.color="0"  background.mode="2" background.color="16777215" )
text(band=footer alignment="1" text="Sumace ZP za pojišťovny, 400" border="0" color="0" x="2226" y="32" height="56" width="1010" html.valueishtml="0"  name=t_7 visible="1"  font.face="Times New Roman" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
compute(band=header alignment="0" expression="'Stránka: ' + page() + '/' + pageCount()"border="0" color="0" x="2565" y="20" height="60" width="635" format="[general]" html.valueishtml="0"  name=page_1 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
compute(band=header alignment="0" expression="'Datum: ' + string(today(),~"dd.mm.yyyy hh:mm~")"border="0" color="0" x="2565" y="88" height="60" width="635" format="[general]" html.valueishtml="0"  name=compute_2 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" pagingmethod=0 generatedddwframes="1" )
xhtmlgen() cssgen(sessionspecific="0" )
xmlgen(inline="0" )
xsltgen()
jsgen()
export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )
import.xml()
export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" )
export.xhtml()
 
 
 
$PBExportHeader$dw_vykaz_nahrad.srd
release 11;
datawindow(units=0 timer_interval=0 color=16777215 processing=0 HTMLDW=no print.printername="" print.documentname="" print.orientation = 1 print.margin.left = 110 print.margin.right = 110 print.margin.top = 97 print.margin.bottom = 97 print.paper.source = 0 print.paper.size = 9 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes print.preview.outline=yes hidegrayline=no showbackcoloronxp=no )
header(height=632 color="536870912" )
summary(height=88 color="536870912" )
footer(height=96 color="536870912" )
detail(height=72 color="536870912" )
table(column=(type=long updatewhereclause=yes name=zamestnanec dbname="mzdy_hlavicka.zamestnanec" )
 column=(type=char(30) updatewhereclause=yes name=karta_zam_cis_zam dbname="karta_zam.cis_zam" )
 column=(type=char(40) updatewhereclause=yes name=karta_zam_jmeno_zam dbname="karta_zam.jmeno_zam" )
 column=(type=long updatewhereclause=yes name=cislo_nesch dbname="mzdy_polozka.cislo_nesch" )
 column=(type=char(3) updatewhereclause=yes name=mzdy_polozka_cmsl dbname="mzdy_polozka.cmsl" )
 column=(type=datetime updatewhereclause=yes name=od dbname="mzdy_polozka.od" )
 column=(type=datetime updatewhereclause=yes name=do dbname="mzdy_polozka.do" )
 column=(type=decimal(2) updatewhereclause=yes name=pracdny dbname="mzdy_polozka.pracdny" )
 column=(type=decimal(2) updatewhereclause=yes name=kaldny dbname="mzdy_polozka.kaldny" )
 column=(type=long updatewhereclause=yes name=poc_dnu_nizsi_sazba dbname="mzdy_polozka.poc_dnu_nizsi_sazba" )
 column=(type=long updatewhereclause=yes name=poc_dnu_vyssi_sazba dbname="mzdy_polozka.poc_dnu_vyssi_sazba" )
 column=(type=decimal(4) updatewhereclause=yes name=prumer_100 dbname="mzdy_polozka.prumer_100" )
 column=(type=decimal(4) updatewhereclause=yes name=prum_pouzity dbname="mzdy_polozka.prum_pouzity" )
 column=(type=decimal(4) updatewhereclause=yes name=koruny dbname="mzdy_polozka.koruny" )
 column=(type=long updatewhereclause=yes name=mesic dbname="mzdy_hlavicka.mesic" )
 column=(type=long updatewhereclause=yes name=rok dbname="mzdy_hlavicka.rok" )
 column=(type=decimal(4) updatewhereclause=yes name=mzdy_polozka_procento_100 dbname="mzdy_polozka.procento_100" )
 column=(type=char(1) updatewhereclause=yes name=mzdy_polozka_skup_doch dbname="mzdy_polozka.skup_doch" values="Dovolená	1/Neplacené volno	2/Absence	3/Vojenské cvičení	4/Ostatní	5/Nemoc - docházka	6/Nemocenská	7/OČR	8/Mateřská	9/Pracovní úraz	0/Ostatní úrazy	A/Korekce fondu	B/Vyrovnávací přísp.	V/Náhrada nemocenské	N/Náhrada - pracovní úraz	P/Náhrada - nepracovní úraz	U/" )
 column=(type=char(1) updatewhereclause=yes name=mzdy_polozka_neproplacena_np dbname="mzdy_polozka.neproplacena_np" )
 column=(type=decimal(2) updatewhereclause=yes name=procento_kraceni dbname="mzdy_polozka.procento_kraceni" )
 column=(type=decimal(2) updatewhereclause=yes name=mzdy_polozka_proc_nizsi_sazba dbname="mzdy_polozka.proc_nizsi_sazba" )
 column=(type=decimal(2) updatewhereclause=yes name=hodiny dbname="mzdy_polozka.hodiny" )
 column=(type=char(40) updatewhereclause=yes name=sub_ms_nazev_subjektu dbname="subjekty.nazev_subjektu" )
 retrieve="  SELECT 
 		lcs.mzdy_hlavicka.zamestnanec,   
		lcs.karta_zam.reference_subjektu cis_zam,   
		lcs.karta_zam.nazev_subjektu jmeno_zam,   
		lcs.davky_np_polozka.cislo_dokladu cislo_nesch,   
		lcs.mzdy_polozka.cmsl,
		lcs.mzdy_polozka.od,   
		lcs.mzdy_polozka.do,   
		lcs.mzdy_polozka.pracdny,   
		lcs.mzdy_polozka.kaldny,   
		lcs.mzdy_polozka.poc_dnu_nizsi_sazba,   
		lcs.mzdy_polozka.poc_dnu_vyssi_sazba, 
		lcs.mzdy_polozka.prumer_100,   
		lcs.mzdy_polozka.prum_pouzity,   
		lcs.mzdy_polozka.koruny,   
		lcs.mzdy_hlavicka.mesic,   
		lcs.mzdy_hlavicka.rok,
		lcs.mzdy_polozka.procento_100,
		lcs.mzdy_polozka.skup_doch, 
		lcs.mzdy_polozka.neproplacena_np,
		lcs.mzdy_polozka.procento_kraceni,
		lcs.mzdy_polozka.proc_nizsi_sazba,
		lcs.mzdy_polozka.proplacene_hodiny hodiny,
		sub_ms.nazev_subjektu
		
    FROM lcs.mzdy_polozka
    JOIN lcs.mzdy_hlavicka ON lcs.mzdy_polozka.cislo_subjektu = lcs.mzdy_hlavicka.cislo_subjektu
    JOIN lcs.karta_zam ON  lcs.mzdy_hlavicka.zamestnanec = lcs.karta_zam.cislo_subjektu
	 JOIN lcs.kontext ON 1=1
	 LEFT OUTER JOIN lcs.davky_np_hlavicka on lcs.davky_np_hlavicka.cislo_subjektu = lcs.mzdy_polozka.id_davky_subjekt
	 LEFT OUTER JOIN lcs.davky_np_polozka on lcs.davky_np_polozka.cislo_objektu = lcs.mzdy_polozka.id_davky_objekt
	LEFT OUTER JOIN lcs.subjekty sub_ms ON sub_ms.cislo_subjektu = lcs.mzdy_polozka.cms
WHERE 
     lcs.mzdy_hlavicka.rok = datepart(year,lcs.kontext.mzdy_obdobi) AND  
     lcs.mzdy_hlavicka.mesic = datepart(month,lcs.kontext.mzdy_obdobi) AND  
     lcs.mzdy_polozka.skup_doch in ( 'N','P','U','6' )
	 and (lcs.mzdy_polozka.skup_doch <> '6' or datum_zahajeni is null or datum_zahajeni >= '2009-01-01')
ORDER BY jmeno_zam ASC, cis_zam ASC, lcs.mzdy_polozka.od ASC
" )
compute(band=header alignment="0" expression="fg_org_vlast_nazev()"border="0" color="0" x="14" y="16" height="156" width="2057" format="[general]" html.valueishtml="0"  name=compute_1 visible="1"  font.face="Times New Roman CE" font.height="-16" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="Výkaz náhrad a nepřítomností při pracovní neschopnosti" border="0" color="0" x="1157" y="272" height="96" width="2240" html.valueishtml="0"  name=t_1 visible="1"  font.face="Times New Roman CE" font.height="-16" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" font.underline="1" background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="Kal.
dny" border="0" color="0" x="1527" y="484" height="128" width="155" html.valueishtml="0"  name=kaldny_t visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Prac.
dny" border="0" color="0" x="1696" y="484" height="128" width="155" html.valueishtml="0"  name=pracdny_t visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Os. čís." border="0" color="0" x="50" y="548" height="64" width="187" html.valueishtml="0"  name=subjekty_cis_zam_t visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Jméno" border="0" color="0" x="251" y="548" height="64" width="165" html.valueishtml="0"  name=subjekty_jmeno_zam_t visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Čís.
dokl." border="0" color="0" x="873" y="484" height="128" width="142" html.valueishtml="0"  name=cislo_nesch_t visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="ČMS" border="0" color="0" x="1042" y="548" height="64" width="128" html.valueishtml="0"  name=subjekty_reference_subjektu_t visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Do" border="0" color="0" x="1358" y="548" height="64" width="155" html.valueishtml="0"  name=do_t visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Od" border="0" color="0" x="1184" y="548" height="64" width="155" html.valueishtml="0"  name=od_t visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Hodiny
" border="0" color="0" x="1870" y="484" height="128" width="206" html.valueishtml="0"  name=t_5 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=header x1="27" y1="624" x2="4795" y2="624"  name=l_1 visible="1" pen.style="0" pen.width="5" pen.color="0"  background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="Redukovaný
PHV" border="0" color="0" x="2331" y="484" height="128" width="311" html.valueishtml="0"  name=prum_pouzity_t visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Dny 
nižší sazbou" border="0" color="0" x="2651" y="484" height="128" width="325" html.valueishtml="0"  name=poc_dnu_nizsi_sazba_t visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Sazba
%" border="0" color="0" x="2990" y="484" height="128" width="192" html.valueishtml="0"  name=t_6 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Dny 
vyšší sazbou" border="0" color="0" x="3209" y="484" height="128" width="320" html.valueishtml="0"  name=t_7 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Sazba
%" border="0" color="0" x="3552" y="484" height="128" width="165" html.valueishtml="0"  name=t_8 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="1" text="Koruny" border="0" color="0" x="3762" y="548" height="64" width="219" html.valueishtml="0"  name=koruny_t visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Popis" border="0" color="0" x="4014" y="548" height="64" width="219" html.valueishtml="0"  name=t_3 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="PHV
" border="0" color="0" x="2098" y="484" height="128" width="210" html.valueishtml="0"  name=prumer_100_t visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=header alignment="1" expression="string(mesic)+~"/~"+string(rok)"border="0" color="0" x="3877" y="264" height="96" width="841" format="[general]" html.valueishtml="0"  name=compute_3 visible="1"  font.face="Times New Roman CE" font.height="-16" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=4 alignment="2" tabsequence=32766 border="0" color="0" x="873" y="4" height="64" width="151" format="[general]" html.valueishtml="0"  name=cislo_nesch visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=6 alignment="2" tabsequence=32766 border="0" color="0" x="1184" y="4" height="64" width="155" format="dd.mm." html.valueishtml="0"  name=od visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=7 alignment="2" tabsequence=32766 border="0" color="0" x="1358" y="4" height="64" width="155" format="dd.mm." html.valueishtml="0"  name=do visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=5 alignment="1" tabsequence=32766 border="0" color="0" x="1042" y="4" height="64" width="128" format="[general]" html.valueishtml="0"  name=mzdy_polozka_cmsl visible="1" edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=2 alignment="1" tabsequence=32766 border="0" color="0" x="50" y="4" height="64" width="192" format="[general]" html.valueishtml="0"  name=karta_zam_cis_zam visible="1" edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=3 alignment="0" tabsequence=32766 border="0" color="0" x="256" y="4" height="64" width="603" format="[general]" html.valueishtml="0"  name=karta_zam_jmeno_zam visible="1" edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=9 alignment="1" tabsequence=32766 border="0" color="0" x="1527" y="4" height="64" width="151" format="0.0" html.valueishtml="0"  name=kaldny visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=8 alignment="1" tabsequence=32766 border="0" color="0" x="1696" y="4" height="64" width="160" format="0.0" html.valueishtml="0"  name=pracdny visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=22 alignment="1" tabsequence=32766 border="0" color="0" x="1874" y="4" height="64" width="201" format="0.0" html.valueishtml="0"  name=hodiny visible="1~tif (  mzdy_polozka_skup_doch = '6', 0, 1)" edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=13 alignment="1" tabsequence=32766 border="0" color="0" x="2336" y="4" height="64" width="297" format="#,##0.00" html.valueishtml="0"  name=prum_pouzity visible="1~tif (  mzdy_polozka_skup_doch = '6', 0, 1)" edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=10 alignment="1" tabsequence=32766 border="0" color="0" x="2656" y="4" height="64" width="302" format="[general]" html.valueishtml="0"  name=poc_dnu_nizsi_sazba visible="1~tif (  mzdy_polozka_skup_doch = '6', 0, 1)" edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
text(band=detail alignment="1" text="60" border="0" color="0" x="3625" y="4" height="64" width="87" html.valueishtml="0"  name=t_2 visible="1~tif (  mzdy_polozka_skup_doch = '6', 0, 1)"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
column(band=detail id=14 alignment="1" tabsequence=32766 border="0" color="0" x="3735" y="4" height="64" width="247" format="#,##0" html.valueishtml="0"  name=koruny visible="1~tif (  mzdy_polozka_skup_doch = '6', 0, 1)" edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=12 alignment="1" tabsequence=32766 border="0" color="0" x="2094" y="4" height="64" width="210" format="#,##0.00" html.valueishtml="0"  name=prumer_100 visible="1~tif (  mzdy_polozka_skup_doch = '6', 0, 1)" edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=23 alignment="0" tabsequence=32766 border="0" color="0" x="4014" y="4" height="64" width="800" format="[general]" html.valueishtml="0"  name=sub_ms_nazev_subjektu visible="1" edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=21 alignment="1" tabsequence=32766 border="0" color="0" x="2990" y="4" height="64" width="187" format="[general]" html.valueishtml="0"  name=mzdy_polozka_proc_nizsi_sazba visible="1~tif (  mzdy_polozka_skup_doch = '6', 0, 1)" edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=detail alignment="1" expression="if(poc_dnu_vyssi_sazba > 0,  pracdny, 0)"border="0" color="0" x="3314" y="4" height="64" width="215" format="[GENERAL]" html.valueishtml="0"  name=compute_7 visible="1"  font.face="Times New Roman" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
compute(band=summary alignment="1" expression="sum(koruny for all)"border="0" color="0" x="3360" y="12" height="64" width="622" format="#,##0" html.valueishtml="0"  name=compute_6 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=summary alignment="0" text="Celkem" border="0" color="0" x="50" y="16" height="64" width="782" html.valueishtml="0"  name=t_4 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="sum(kaldny for all)"border="0" color="0" x="1527" y="12" height="64" width="151" format="0.0" html.valueishtml="0"  name=compute_16 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=summary alignment="1" expression="sum(pracdny for all)"border="0" color="0" x="1696" y="12" height="64" width="160" format="0.0" html.valueishtml="0"  name=compute_17 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
line(band=summary x1="27" y1="4" x2="4795" y2="4"  name=l_2 visible="1" pen.style="0" pen.width="5" pen.color="0"  background.mode="1" background.color="553648127" )
compute(band=summary alignment="1" expression="sum(hodiny for all)"border="0" color="0" x="1870" y="12" height="64" width="206" format="0.0" html.valueishtml="0"  name=compute_5 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=footer alignment="0" expression="fg_org_vlast_nazev()"border="0" color="0" x="32" y="24" height="64" width="1152" format="[general]" html.valueishtml="0"  name=compute_8 visible="1"  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=footer x1="32" y1="8" x2="4795" y2="8"  name=l_8 visible="1" pen.style="0" pen.width="5" pen.color="0"  background.mode="2" background.color="16777215" )
compute(band=header alignment="0" expression="'Stránka: ' + page() + '/' + pageCount()"border="0" color="0" x="4078" y="12" height="60" width="635" format="[general]" html.valueishtml="0"  name=page_1 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
compute(band=header alignment="0" expression="'Datum: ' + string(today(),~"dd.mm.yyyy hh:mm~")"border="0" color="0" x="4078" y="80" height="60" width="635" format="[general]" html.valueishtml="0"  name=compute_2 visible="1"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
compute(band=footer alignment="0" expression="fg_nazev_produktu()"border="0" color="0" x="2181" y="24" height="64" width="709" format="[GENERAL]" html.valueishtml="0"  name=compute_9 visible="1"  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
text(band=footer alignment="1" text="Výkaz náhrad mezd, 5916" border="0" color="0" x="3785" y="24" height="64" width="992" html.valueishtml="0"  name=t_9 visible="1"  font.face="Times New Roman CE" font.height="-8" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" pagingmethod=0 generatedddwframes="1" )
xhtmlgen() cssgen(sessionspecific="0" )
xmlgen(inline="0" )
xsltgen()
jsgen()
export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )
import.xml()
export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" )
export.xhtml()
 
 
 
 
$PBExportHeader$dw_vykaz_davek_np.srd
release 7;
datawindow(units=0 timer_interval=0 color=16777215 processing=0 HTMLDW=no print.documentname="" print.orientation = 1 print.margin.left = 110 print.margin.right = 110 print.margin.top = 97 print.margin.bottom = 97 print.paper.source = 0 print.paper.size = 9 print.prompt=no print.buttons=no print.preview.buttons=no )
header(height=632 color="536870912" )
summary(height=88 color="536870912" )
footer(height=92 color="536870912" )
detail(height=72 color="536870912" )
table(column=(type=long updatewhereclause=yes name=zamestnanec dbname="mzdy_hlavicka.zamestnanec" )
 column=(type=char(30) updatewhereclause=yes name=karta_zam_cis_zam dbname="karta_zam.cis_zam" )
 column=(type=char(40) updatewhereclause=yes name=karta_zam_jmeno_zam dbname="karta_zam.jmeno_zam" )
 column=(type=long updatewhereclause=yes name=cislo_nesch dbname="mzdy_polozka.cislo_nesch" )
 column=(type=char(3) updatewhereclause=yes name=mzdy_polozka_cmsl dbname="mzdy_polozka.cmsl" )
 column=(type=datetime updatewhereclause=yes name=od dbname="mzdy_polozka.od" )
 column=(type=datetime updatewhereclause=yes name=do dbname="mzdy_polozka.do" )
 column=(type=decimal(2) updatewhereclause=yes name=pracdny dbname="mzdy_polozka.pracdny" )
 column=(type=decimal(2) updatewhereclause=yes name=kaldny dbname="mzdy_polozka.kaldny" )
 column=(type=long updatewhereclause=yes name=poc_dnu_nizsi_sazba dbname="mzdy_polozka.poc_dnu_nizsi_sazba" )
 column=(type=long updatewhereclause=yes name=poc_dnu_vyssi_sazba dbname="mzdy_polozka.poc_dnu_vyssi_sazba" )
 column=(type=decimal(4) updatewhereclause=yes name=prumer_100 dbname="mzdy_polozka.prumer_100" )
 column=(type=decimal(4) updatewhereclause=yes name=prum_pouzity dbname="mzdy_polozka.prum_pouzity" )
 column=(type=decimal(4) updatewhereclause=yes name=koruny dbname="mzdy_polozka.koruny" )
 column=(type=long updatewhereclause=yes name=mesic dbname="mzdy_hlavicka.mesic" )
 column=(type=long updatewhereclause=yes name=rok dbname="mzdy_hlavicka.rok" )
 column=(type=decimal(4) updatewhereclause=yes name=mzdy_polozka_procento_100 dbname="mzdy_polozka.procento_100" )
 column=(type=char(1) updatewhereclause=yes name=mzdy_polozka_skup_doch dbname="mzdy_polozka.skup_doch" values="Dovolená	1/Neplacené volno	2/Absence	3/Vojenské cvičení	4/Ostatní	5/Nemoc - docházka	6/Nemocenská	7/OČR	8/Mateřská	9/Pracovní úraz	0/Ostatní úrazy	A/Korekce fondu	B/Vyrovnávací přísp.	V/" )
 column=(type=char(1) updatewhereclause=yes name=mzdy_polozka_neproplacena_np dbname="mzdy_polozka.neproplacena_np" )
 column=(type=datetime updatewhereclause=yes name=datum_zahajeni dbname="davka_datum_zahajeni" )
 column=(type=long updatewhereclause=yes name=poc_dnu_nejnizsi_sazba dbname="mzdy_polozka.poc_dnu_nejnizsi_sazba" )
 column=(type=decimal(4) updatewhereclause=yes name=procento_kraceni dbname="mzdy_polozka.procento_kraceni" )
 retrieve="  SELECT 
 		lcs.mzdy_hlavicka.zamestnanec,   
		lcs.karta_zam.reference_subjektu cis_zam,   
		lcs.karta_zam.nazev_subjektu jmeno_zam,   
		lcs.mzdy_polozka.cislo_nesch,   
		lcs.mzdy_polozka.cmsl,
		lcs.mzdy_polozka.od,   
		lcs.mzdy_polozka.do,   
		lcs.mzdy_polozka.pracdny,   
		lcs.mzdy_polozka.kaldny,   
		lcs.mzdy_polozka.poc_dnu_nizsi_sazba,   
		lcs.mzdy_polozka.poc_dnu_vyssi_sazba, 
		lcs.mzdy_polozka.prumer_100,   
		lcs.mzdy_polozka.prum_pouzity_zkrac,   
		lcs.mzdy_polozka.koruny,   
		lcs.mzdy_hlavicka.mesic,   
		lcs.mzdy_hlavicka.rok,
		lcs.mzdy_polozka.procento_100,
		lcs.mzdy_polozka.skup_doch, 
		lcs.mzdy_polozka.neproplacena_np,
		lcs.davky_np_hlavicka.datum_zahajeni,
		isnull(lcs.mzdy_polozka.poc_dnu_nejnizsi_sazba,0),
		lcs.mzdy_polozka.procento_kraceni
    FROM lcs.mzdy_polozka
    JOIN lcs.mzdy_hlavicka ON lcs.mzdy_polozka.cislo_subjektu = lcs.mzdy_hlavicka.cislo_subjektu
    JOIN lcs.karta_zam ON  lcs.mzdy_hlavicka.zamestnanec = lcs.karta_zam.cislo_subjektu
	 JOIN lcs.kontext ON 1=1
	 LEFT OUTER JOIN lcs.davky_np_hlavicka on lcs.davky_np_hlavicka.cislo_subjektu = lcs.mzdy_polozka.id_davky_subjekt
   WHERE 
     lcs.mzdy_hlavicka.rok = datepart(year,lcs.kontext.mzdy_obdobi) AND  
     lcs.mzdy_hlavicka.mesic = datepart(month,lcs.kontext.mzdy_obdobi) AND  
     lcs.mzdy_polozka.skup_doch in ( '7','8','9','0','A','V' )
ORDER BY jmeno_zam ASC, cis_zam ASC
" )
compute(band=header alignment="0" expression="fg_org_vlast_nazev()"border="0" color="0" x="14" y="16" height="156" width="2057" format="[general]"  name=compute_1  font.face="Times New Roman CE" font.height="-16" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="Výkaz dávek nemocenského pojištění" border="0" color="0" x="782" y="276" height="96" width="1605"  name=t_1  font.face="Times New Roman CE" font.height="-16" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" font.underline="1" background.mode="1" background.color="553648127" )
compute(band=header alignment="1" expression="string(mesic)+~"/~"+string(rok)"border="0" color="0" x="3237" y="276" height="96" width="841" format="[general]"  name=compute_3  font.face="Times New Roman CE" font.height="-16" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=header alignment="1" expression="~"Datum: ~" + string( today(),~"d.m.yyyy~")"border="0" color="0" x="3557" y="120" height="64" width="521" format="[general]"  name=compute_4  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=header alignment="1" expression="'Strana ' + page() + ' z ' + pageCount()"border="0" color="0" x="3438" y="44" height="64" width="640" format="[GENERAL]"  name=compute_2  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="Kal.
dny" border="0" color="0" x="1527" y="484" height="128" width="155"  name=kaldny_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Prac.
dny" border="0" color="0" x="1696" y="484" height="128" width="155"  name=pracdny_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Průměr
DNP" border="0" color="0" x="1870" y="484" height="128" width="201"  name=prumer_100_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Denní
vym.zákl." border="0" color="0" x="2094" y="484" height="128" width="219"  name=prum_pouzity_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Dny 
0/60/25" border="0" color="0" x="2313" y="484" height="128" width="183"  name=poc_dnu_nizsi_sazba_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Os. čís." border="0" color="0" x="50" y="548" height="64" width="187"  name=subjekty_cis_zam_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Jméno" border="0" color="0" x="251" y="548" height="64" width="165"  name=subjekty_jmeno_zam_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Čís.
dokl." border="0" color="0" x="873" y="484" height="128" width="142"  name=cislo_nesch_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="ČMS" border="0" color="0" x="1042" y="548" height="64" width="128"  name=subjekty_reference_subjektu_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Do" border="0" color="0" x="1358" y="548" height="64" width="155"  name=do_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Od" border="0" color="0" x="1184" y="548" height="64" width="155"  name=od_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Sazba
0/60/25" border="0" color="0" x="2501" y="484" height="128" width="174"  name=t_6  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Dny 
60%" border="0" color="0" x="2683" y="484" height="128" width="165"  name=t_7  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Sazba
60%" border="0" color="0" x="2871" y="484" height="128" width="165"  name=t_8  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Dny 
69%" border="0" color="0" x="3429" y="484" height="128" width="165"  name=t_13  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Sazba
69%" border="0" color="0" x="3611" y="484" height="128" width="165"  name=t_14  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Dny 
72%" border="0" color="0" x="3794" y="484" height="128" width="165"  name=t_16  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Sazba
72%" border="0" color="0" x="3977" y="484" height="128" width="165"  name=t_17  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="1" text="Koruny" border="0" color="0" x="4178" y="548" height="64" width="219"  name=koruny_t  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Popis" border="0" color="0" x="4421" y="548" height="64" width="219"  name=t_3  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Dny 
66%" border="0" color="0" x="3058" y="484" height="128" width="165"  name=t_10  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Sazba
66%" border="0" color="0" x="3246" y="484" height="128" width="165"  name=t_11  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=header x1="27" y1="624" x2="4891" y2="624"  name=l_1 pen.style="0" pen.width="5" pen.color="0"  background.mode="1" background.color="553648127" )
column(band=detail id=9 alignment="1" tabsequence=32766 border="0" color="0" x="1527" y="4" height="64" width="151" format="[general]"  name=kaldny edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=8 alignment="1" tabsequence=32766 border="0" color="0" x="1696" y="4" height="64" width="160" format="0.0"  name=pracdny edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=12 alignment="1" tabsequence=32766 border="0" color="0" x="1870" y="4" height="64" width="206" format="#,##0.00"  name=prumer_100 edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=13 alignment="1" tabsequence=32766 border="0" color="0" x="2094" y="4" height="64" width="206" format="#,##0.00"  name=prum_pouzity edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=4 alignment="2" tabsequence=32766 border="0" color="0" x="873" y="4" height="64" width="151" format="[general]"  name=cislo_nesch edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=6 alignment="2" tabsequence=32766 border="0" color="0" x="1184" y="4" height="64" width="155" format="dd.mm."  name=od edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=7 alignment="2" tabsequence=32766 border="0" color="0" x="1358" y="4" height="64" width="155" format="dd.mm."  name=do edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=5 alignment="1" tabsequence=32766 border="0" color="0" x="1042" y="4" height="64" width="128" format="[general]"  name=mzdy_polozka_cmsl edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=detail alignment="1" expression="if (  mzdy_polozka_neproplacena_np = ~"A~",  mzdy_polozka_procento_100 , poc_dnu_nejnizsi_sazba )"border="0" color="0" x="2322" y="4" height="64" width="169" format="[GENERAL]"  name=compute_8 visible="1~tif (compute_8 > 0, 1, 0)"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=2 alignment="1" tabsequence=32766 border="0" color="0" x="50" y="4" height="64" width="192" format="[general]"  name=karta_zam_cis_zam edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=3 alignment="0" tabsequence=32766 border="0" color="0" x="256" y="4" height="64" width="603" format="[general]"  name=karta_zam_jmeno_zam edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
text(band=detail alignment="1" text="*" border="0" color="255" x="0" y="4" height="64" width="37"  name=t_2 visible="1~tif ( year( datum_zahajeni ) >= 2008 or isnull(datum_zahajeni), 0, 1)"  font.face="Times New Roman CE" font.height="-12" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
column(band=detail id=14 alignment="1" tabsequence=32766 border="0" color="0" x="4160" y="4" height="64" width="247" format="#,##0"  name=koruny edit.limit=0 edit.case=any edit.autoselect=yes  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=18 alignment="0" tabsequence=32766 border="0" color="0" x="4425" y="4" height="64" width="475" format="[general]"  name=mzdy_polozka_skup_doch edit.name="skup_dochazka" ddlb.limit=0 ddlb.allowedit=no ddlb.case=any  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=detail alignment="1" expression="ceiling( prum_pouzity *0.72 * if (procento_kraceni > 0,  (100-procento_kraceni) / 100, 1))"border="0" color="0" x="3973" y="4" height="64" width="169" format="0"  name=compute_11 visible="1~tif (compute_13 > 0, 1, 0)"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=detail alignment="1" expression="if (  mzdy_polozka_skup_doch = '7' or  mzdy_polozka_skup_doch = '0' or  mzdy_polozka_skup_doch = 'A' or  mzdy_polozka_skup_doch = 'V',   poc_dnu_vyssi_sazba , 0)"border="0" color="0" x="3790" y="4" height="64" width="169" format="[GENERAL]"  name=compute_13 visible="1~tif (compute_13 > 0, 1, 0)"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=detail alignment="1" expression="ceiling( prum_pouzity *0.69 * if (procento_kraceni > 0,  (100-procento_kraceni) / 100, 1))"border="0" color="0" x="3607" y="4" height="64" width="169" format="0"  name=compute_10 visible="1~tif (compute_14 > 0, 1, 0)"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=detail alignment="1" expression="if (  mzdy_polozka_skup_doch = '9',    poc_dnu_vyssi_sazba , 0)"border="0" color="0" x="3424" y="4" height="64" width="169" format="[GENERAL]"  name=compute_14 visible="1~tif (compute_14 > 0, 1, 0)"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=detail alignment="1" expression="if (  mzdy_polozka_skup_doch = '8',  poc_dnu_vyssi_sazba , if (  mzdy_polozka_skup_doch = '7' or  mzdy_polozka_skup_doch = '0' or  mzdy_polozka_skup_doch = 'A' or  mzdy_polozka_skup_doch = 'V', if ( mzdy_polozka_neproplacena_np = ~"N~" and  poc_dnu_nizsi_sazba = 0 and  poc_dnu_vyssi_sazba = 0 and  poc_dnu_nejnizsi_sazba = 0,  mzdy_polozka_procento_100 ,0), 0))"border="0" color="0" x="2683" y="4" height="64" width="169" format="[GENERAL]"  name=compute_5 visible="1~tif (compute_5 > 0, 1, 0)"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=detail alignment="1" expression="ceiling( prum_pouzity *0.6 * if (procento_kraceni > 0,  (100-procento_kraceni) / 100, 1))"border="0" color="0" x="2871" y="4" height="64" width="169" format="0"  name=compute_7 visible="1~tif (compute_5 > 0, 1, 0)"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=detail alignment="1" expression="if (  mzdy_polozka_skup_doch = '7' or  mzdy_polozka_skup_doch = '0' or  mzdy_polozka_skup_doch = 'A' or  mzdy_polozka_skup_doch = 'V',  poc_dnu_nizsi_sazba , 0)"border="0" color="0" x="3054" y="4" height="64" width="169" format="[GENERAL]"  name=compute_12 visible="1~tif (compute_12 > 0, 1, 0)"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=detail alignment="1" expression="ceiling( prum_pouzity *0.66 * if (procento_kraceni > 0,  (100-procento_kraceni) / 100, 1))"border="0" color="0" x="3241" y="4" height="64" width="169" format="0"  name=compute_9 visible="1~tif (compute_12 > 0, 1, 0)"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=detail alignment="1" expression="if (  mzdy_polozka_neproplacena_np  = ~"A~", 0, ceiling( prum_pouzity *  if (procento_kraceni > 0,  (100-procento_kraceni) / 100, 1) * if ( datum_zahajeni < date('1.9.2008'), 0.6, 0.25)))"border="0" color="0" x="2501" y="4" height="64" width="169" format="0"  name=compute_15 visible="1~tif (compute_8 > 0 , 1, 0)"  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=summary alignment="1" expression="sum(koruny for all)"border="0" color="0" x="3785" y="12" height="64" width="622" format="#,##0"  name=compute_6  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=summary alignment="0" text="Celkem" border="0" color="0" x="50" y="16" height="64" width="782"  name=t_4  font.face="Times New Roman CE" font.height="-10" font.weight="700"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=summary x1="27" y1="4" x2="4891" y2="4"  name=l_2 pen.style="0" pen.width="5" pen.color="0"  background.mode="1" background.color="553648127" )
compute(band=summary alignment="1" expression="sum(kaldny for all)"border="0" color="0" x="1527" y="12" height="64" width="151" format="[general]"  name=compute_16  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
compute(band=summary alignment="1" expression="sum(pracdny for all)"border="0" color="0" x="1696" y="12" height="64" width="160" format="0.0"  name=compute_17  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
text(band=footer alignment="0" text="Pro likvidaci dávek u zaměstnanců označených * (DNP z roku 2007) nutno použít šablonu Výkaz dávek NP od r. 2004 (č. 4715)." border="0" color="0" x="32" y="12" height="64" width="4791"  name=t_5  font.face="Times New Roman CE" font.height="-10" font.weight="400"  font.family="1" font.pitch="2" font.charset="238" background.mode="2" background.color="16777215" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" )
 
 
 
$PBExportHeader$dw_sk_polozky_special_tab.srd
release 7;
datawindow(units=0 timer_interval=60000 color=12632256 processing=1 HTMLDW=no print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 97 print.margin.bottom = 97 print.paper.source = 0 print.paper.size = 0 print.prompt=no print.buttons=no print.preview.buttons=no grid.lines=0 selected.mouse=no )
header(height=76 color="-1" )
summary(height=84 color="-1" )
footer(height=0 color="-1" )
detail(height=80 color="-1" )
table(column=(type=long updatewhereclause=yes name=cislo_subjektu dbname="sk_hlavicka.cislo_subjektu" )
 column=(type=long updatewhereclause=yes identity=yes name=cislo_objektu dbname="sk_polozka.cislo_objektu" )
 column=(type=long updatewhereclause=yes name=cislo_radky dbname="sk_polozka.cislo_radky" )
 column=(type=char(30) updatewhereclause=yes name=subjekty_reference_subjektu dbname="sk_hlavicka.reference_subjektu" )
 column=(type=long updatewhereclause=yes name=zdroj dbname="sk_polozka.zdroj" )
 column=(type=char(30) updatewhereclause=yes name=zdroj_refer dbname="sk_hlavicka.reference_subjektu" )
 column=(type=char(40) updatewhereclause=yes name=zdroj_nazev dbname="sk_hlavicka.nazev_subjektu" )
 column=(type=long updatewhereclause=yes name=sklad dbname="sk_polozka.sklad" )
 column=(type=char(30) updatewhereclause=yes name=sklad_refer dbname="sk_hlavicka.reference_subjektu" )
 column=(type=char(1) updatewhereclause=yes name=typ dbname="sk_polozka.typ" values="Příjemka	1/Výdejka	2/Objednávka	3/Poptávka	4/Potvrzená objednávka	5/Rezervace	6/Oceňovací odchylka	7/Rozpouštění odchylky	8/Inventura	0/Průběžka	T/Soupiska	S/" )
 column=(type=char(1) updatewhereclause=yes name=stav dbname="sk_polozka.stav" values="Zavedeno	0/Realizováno	1/" )
 column=(type=datetime updatewhereclause=yes name=datum dbname="sk_hlavicka.datum" )
 column=(type=long updatewhereclause=yes name=organizace dbname="sk_polozka.organizace" )
 column=(type=char(40) updatewhereclause=yes name=organizace_nazev dbname="sk_hlavicka.nazev_subjektu" )
 column=(type=datetime updatewhereclause=yes name=datum_plan dbname="sk_polozka.datum_plan" )
 column=(type=char(1) updatewhereclause=yes name=stornovano dbname="sk_polozka.stornovano" values="	1/	0/	2" )
 column=(type=decimal(4) updatewhereclause=yes name=cena_jedn dbname="sk_polozka.cena_jedn" )
 column=(type=decimal(4) updatewhereclause=yes name=cena_zaklad dbname="sk_polozka.cena_zaklad" )
 column=(type=decimal(4) updatewhereclause=yes name=cena_evid_jedn dbname="sk_polozka.cena_evid_jedn" )
 column=(type=decimal(4) updatewhereclause=yes name=cena_evid_celkem dbname="sk_polozka.cena_evid_celkem" )
 column=(type=char(1) updatewhereclause=yes name=korekce dbname="sk_polozka.korekce" values="	A/	N" )
 column=(type=decimal(6) updatewhereclause=yes name=pocet dbname="sk_polozka.pocet" )
 column=(type=decimal(6) updatewhereclause=yes name=pocet_real dbname="sk_polozka.pocet_real" )
 column=(type=decimal(6) updatewhereclause=yes name=pocet_zbyva dbname="pocet_zbyva" )
 column=(type=char(1) updatewhereclause=yes name=splneno dbname="sk_polozka.splneno" )
 column=(type=char(30) updatewhereclause=yes name=organizace_refer dbname="sk_hlavicka.reference_subjektu" )
 column=(type=long updatewhereclause=yes name=pohyb dbname="sk_polozka.pohyb" )
 column=(type=char(30) updatewhereclause=yes name=pohyb_refer dbname="sk_hlavicka.pohyb_refer" )
 column=(type=long updatewhereclause=yes name=rezerva dbname="kmenova_karta_skladu.rezerva" )
 column=(type=long updatewhereclause=yes name=skluz dbname="skluz" )
 retrieve="SELECT 
 	lcs.sk_hlavicka.cislo_subjektu,
 	lcs.sk_polozka.cislo_objektu,
 	lcs.sk_polozka.cislo_radky, 
 	lcs.sk_hlavicka.reference_subjektu,
 	lcs.sk_polozka.zdroj, 
 	subjekty_a.reference_subjektu, 
 	subjekty_a.nazev_subjektu, 
 	lcs.sk_polozka.sklad, 
 	subjekty_b.reference_subjektu, 
 	lcs.sk_polozka.typ, 
 	lcs.sk_polozka.stav, 
 	lcs.sk_hlavicka.datum, 
 	lcs.sk_polozka.organizace, 
 	subjekty_c.nazev_subjektu, 
 	lcs.sk_polozka.datum_plan, 
 	lcs.sk_polozka.stornovano, 
 	lcs.sk_polozka.cena_jedn, 
 	lcs.sk_polozka.cena_zaklad, 
 	lcs.sk_polozka.cena_evid_jedn, 
 	lcs.sk_polozka.cena_evid_celkem, 
 	lcs.sk_polozka.korekce, 
 	lcs.sk_polozka.pocet,
 	lcs.sk_polozka.pocet_real,
 	(case lcs.sk_polozka.splneno when 'A' then 0 else lcs.sk_polozka.pocet-lcs.sk_polozka.pocet_real end ) pocet_zbyva, 
 	lcs.sk_polozka.splneno, 
 	subjekty_c.reference_subjektu, 
 	lcs.sk_polozka.pohyb,
 	subjekty_d.reference_subjektu pohyb_refer,
	lcs.kmenova_karta_skladu.rezerva, 
	datediff(day, lcs.sk_polozka.datum_plan, getdate()) skluz  
	  
	
 FROM 
 	lcs.sk_hlavicka, 
 	lcs.sk_polozka, 
 	lcs.subjekty subjekty_a,  
 	lcs.subjekty subjekty_b,  
 	lcs.subjekty subjekty_c, 
 	lcs.subjekty subjekty_d, 
	lcs.kmenova_karta_skladu 

 WHERE lcs.sk_hlavicka.cislo_subjektu = lcs.sk_polozka.cislo_subjektu and 
  	lcs.sk_polozka.zdroj *= subjekty_a.cislo_subjektu and 
 	lcs.sk_polozka.sklad *= subjekty_b.cislo_subjektu and 
 	lcs.sk_polozka.organizace *= subjekty_c.cislo_subjektu and
 	lcs.sk_polozka.pohyb *= subjekty_d.cislo_subjektu  and
	lcs.sk_polozka.zdroj *= lcs.kmenova_karta_skladu.cislo_subjektu  and
	lcs.sk_polozka.stav='1' and
	isnull(lcs.sk_polozka.splneno,'N')='N' 

ORDER BY
 	lcs.sk_hlavicka.reference_subjektu DESC 
" )
text(band=header alignment="2" text="Doklad" border="6" color="0" x="9" y="8" height="64" width="283"  name=subjekty_reference_subjektu_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" font.underline="1" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Datum" border="6" color="0" x="302" y="8" height="64" width="352"  name=datum_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="Typ" border="6" color="0" x="663" y="8" height="64" width="133"  name=typ_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="ř." border="6" color="0" x="805" y="8" height="64" width="73"  name=cislo_radky_t  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Č. zboží" border="6" color="0" x="887" y="8" height="64" width="270"  name=zdroj_refer_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" font.underline="1" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Zboží" border="6" color="0" x="1166" y="8" height="64" width="366"  name=zdroj_nazev_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" font.underline="1" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Množství" border="6" color="0" x="1541" y="8" height="64" width="279"  name=pocet_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="Splněno" border="6" color="0" x="1829" y="8" height="64" width="261"  name=pocet_real_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
text(band=header alignment="0" text="Vyř" border="6" color="0" x="2098" y="8" height="64" width="101"  name=splneno_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Sklad" border="6" color="0" x="2208" y="8" height="64" width="197"  name=sklad_refer_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" font.underline="1" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Datum plán" border="6" color="0" x="2414" y="8" height="64" width="352"  name=datum_plan_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Skluz" border="6" color="0" x="2775" y="8" height="64" width="169"  name=skluz_t  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Č. org." border="6" color="0" x="2953" y="8" height="64" width="256"  name=organizace_refer_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" font.underline="1" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Organizace" border="6" color="0" x="3218" y="8" height="64" width="357"  name=organizace_nazev_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" font.underline="1" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Jedn. cena" border="6" color="0" x="3584" y="8" height="64" width="325"  name=cena_jedn_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Cena základ" border="6" color="0" x="3918" y="8" height="64" width="389"  name=cena_zaklad_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="S" border="6" color="0" x="4315" y="8" height="64" width="55"  name=stornovano_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="K" border="6" color="0" x="4379" y="8" height="64" width="59"  name=korekce_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Stav" border="6" color="0" x="4448" y="8" height="64" width="137"  name=stav_t  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Jedn. evid. cena" border="6" color="0" x="4594" y="8" height="64" width="439"  name=cena_evid_jedn_t  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Celk. evid. cena" border="6" color="0" x="5042" y="8" height="64" width="434"  name=cena_evid_celkem_t  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Podklad" border="6" color="0" x="5486" y="8" height="64" width="261"  name=pohyb_refer_t  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
text(band=header alignment="0" text="Rezerva" border="6" color="0" x="5755" y="8" height="64" width="192"  name=t_1  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Množství zbývá" border="6" color="0" x="5957" y="8" height="64" width="507"  name=pocet_zbyva_t  font.face="System" font.height="-12" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="553648127" )
column(band=detail id=6 alignment="0" tabsequence=32766 border="0" color="0" x="887" y="8" height="68" width="270" format="[general]"  name=zdroj_refer edit.limit=30 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=11 alignment="0" tabsequence=32766 border="0" color="0" x="4448" y="8" height="68" width="137" format="[general]"  name=stav edit.name="typ_sk_pohyb_stav" ddlb.limit=0 ddlb.allowedit=no ddlb.case=any  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=9 alignment="0" tabsequence=32766 border="0" color="0" x="2208" y="8" height="68" width="197" format="[general]"  name=sklad_refer edit.limit=30 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=15 alignment="1" tabsequence=32766 border="0" color="0" x="2414" y="8" height="68" width="352" format="dd.mm.yyyy"  name=datum_plan edit.name="datum" editmask.autoskip=yes editmask.mask="dd.mm.yyyy" editmask.focusrectangle=no  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=16 alignment="0" tabsequence=32766 border="0" color="0" x="4315" y="8" height="68" width="55" format="[general]"  name=stornovano checkbox.text="" checkbox.on="1" checkbox.off="0" checkbox.other="2" checkbox.lefttext=yes checkbox.scale=no checkbox.threed=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=21 alignment="0" tabsequence=32766 border="0" color="0" x="4379" y="8" height="68" width="59" format="[general]"  name=korekce edit.name="switchA/N" checkbox.text="" checkbox.on="A" checkbox.off="N" checkbox.lefttext=yes checkbox.scale=no checkbox.threed=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=20 alignment="1" tabsequence=32766 border="0" color="0" x="5042" y="8" height="68" width="434" format="##,###,###,##0.00"  name=cena_evid_celkem edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=22 alignment="1" tabsequence=32766 border="0" color="0" x="1541" y="8" height="68" width="279" format="############0.0#####"  name=pocet edit.limit=0 edit.case=any edit.autoselect=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=23 alignment="1" tabsequence=32766 border="0" color="0" x="1829" y="8" height="68" width="261" format="############0.0#####"  name=pocet_real edit.limit=0 edit.case=any edit.autoselect=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=3 alignment="1" tabsequence=32766 border="0" color="0" x="805" y="8" height="68" width="73" format="[general]"  name=cislo_radky edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=4 alignment="0" tabsequence=32766 border="0" color="0" x="9" y="8" height="68" width="283" format="[general]"  name=subjekty_reference_subjektu edit.limit=30 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=10 alignment="0" tabsequence=32766 border="0" color="0" x="663" y="8" height="68" width="133" format="[general]"  name=typ edit.name="typ_sk_pohyb" ddlb.limit=0 ddlb.allowedit=no ddlb.case=any  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
column(band=detail id=7 alignment="0" tabsequence=32766 border="0" color="0" x="1166" y="8" height="68" width="366" format="[general]"  name=zdroj_nazev edit.limit=40 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=17 alignment="1" tabsequence=32766 border="0" color="0" x="3584" y="8" height="68" width="325" format="##,###,###,##0.0000"  name=cena_jedn edit.name="editmena" edit.limit=0 edit.case=any edit.format="#########0.00" edit.focusrectangle=no edit.autoselect=no  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=19 alignment="1" tabsequence=32766 border="0" color="0" x="4594" y="8" height="68" width="439" format="##,###,###,##0.0000"  name=cena_evid_jedn edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=25 alignment="0" tabsequence=32766 border="0" color="0" x="2098" y="8" height="68" width="101" format="[general]"  name=splneno edit.limit=0 edit.case=any edit.autoselect=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=14 alignment="0" tabsequence=32766 border="0" color="0" x="3218" y="8" height="68" width="357" format="[general]"  name=organizace_nazev edit.limit=40 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=26 alignment="0" tabsequence=32766 border="0" color="0" x="2953" y="8" height="68" width="256" format="[general]"  name=organizace_refer edit.limit=0 edit.case=any edit.autoselect=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=18 alignment="1" tabsequence=32766 border="0" color="0" x="3918" y="8" height="68" width="389" format="##,###,###,##0.00"  name=cena_zaklad edit.limit=0 edit.case=any edit.autoselect=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=28 alignment="0" tabsequence=32766 border="0" color="0" x="5486" y="8" height="68" width="261" format="[general]"  name=pohyb_refer edit.limit=0 edit.case=any edit.autoselect=yes  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
column(band=detail id=30 alignment="1" tabsequence=32766 border="0" color="0~tif (daysafter( datum_plan, today() )<=0, 
rgb(0,0,255),
 if (daysafter( relativedate(datum_plan, rezerva_x),today() )<=0,
rgb(200,0,255) , 
rgb(255,0,0) )
)" x="2775" y="8" height="68" width="169" format="[general]"  name=skluz edit.limit=0 edit.case=any edit.autoselect=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=detail alignment="1" expression="if (isnull(rezerva) or rezerva<0 or typ<>'3', 0, rezerva)"border="0" color="0" x="5755" y="8" height="68" width="192" format="[General]"  name=rezerva_x  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
column(band=detail id=12 alignment="0" tabsequence=32766 border="0" color="0" x="302" y="8" height="64" width="352" format="dd.mm.yyyy"  name=datum accelerator=" " edit.name="datum" editmask.autoskip=yes editmask.mask="dd.mm.yyyy" editmask.focusrectangle=no  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
column(band=detail id=24 alignment="1" tabsequence=32766 border="0" color="0" x="5957" y="8" height="68" width="507" format="############0.0#####"  name=pocet_zbyva edit.limit=0 edit.case=any edit.autoselect=yes  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="count(cislo_subjektu for all distinct)"border="0" color="0" x="9" y="12" height="64" width="283" format="[general]"  name=compute_1  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="sum(pocet_real for all)"border="0" color="0" x="1829" y="12" height="64" width="261" format="############0.0#####"  name=compute_2  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="sum(cena_zaklad for all)"border="0" color="0" x="3918" y="12" height="64" width="389" format="[general]"  name=compute_3  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="sum(cena_evid_celkem for all)"border="0" color="0" x="5042" y="12" height="64" width="434" format="##,###,###,##0.00"  name=compute_4  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="count(sklad for all distinct) "border="0" color="0" x="2208" y="12" height="64" width="197" format="[general]"  name=compute_5  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="count(organizace for all distinct)"border="0" color="0" x="3218" y="12" height="64" width="357" format="[general]"  name=compute_6  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="count(typ for all distinct)"border="0" color="0" x="663" y="12" height="64" width="133" format="[general]"  name=compute_8  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="count(zdroj for all distinct)"border="0" color="0" x="1166" y="12" height="64" width="366" format="[general]"  name=compute_9  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="sum(pocet for all)"border="0" color="0" x="1541" y="12" height="64" width="279" format="############0.0#####"  name=compute_10  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=summary alignment="1" expression="count(stav for all distinct)"border="0" color="0" x="4448" y="12" height="64" width="137" format="[general]"  name=compute_11  font.face="System" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
compute(band=summary alignment="0" expression="count(pohyb for all)"border="0" color="0" x="5486" y="12" height="64" width="261" format="[general]"  name=compute_12  font.face="MS Sans Serif" font.height="-10" font.weight="400"  font.family="2" font.pitch="2" font.charset="238" background.mode="1" background.color="536870912" )
line(band=summary x1="658" y1="4" x2="6830" y2="4"  name=l_1 pen.style="0" pen.width="5" pen.color="0"  background.mode="1" background.color="536870912" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" )
 
 
 
 
 
 
 
 
 
 
 
    */
    #endregion
}
